home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-07-14 | 57.9 KB | [TEXT/PJMM] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: ICSwitchGlue.p
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| ZX81 Sinclair BASIC (image/sinclairBASIC)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Applause Picture (image/applausePicture)
| ext
| Unsupported |
1%
| dexvert
| bsdiff patch (other/bsdiffPatch)
| ext
| Unsupported |
1%
| dexvert
| imgdiff patch (other/imgdiffPatch)
| ext
| Unsupported |
1%
| dexvert
| MATLAB p-code (other/matlabPCode)
| ext
| Unsupported |
1%
| dexvert
| WSUS Patch Storage File (other/wsusPatchStorageFile)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sun Jul 14 20:22:30 1996, modified Sun Jul 14 20:22:30 1996, creator Think Pascal, type ASCII, 40682 bytes "ICSwitchGlue.p" , at 0x9f6a 18414 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [PJMM] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 49 43 53 77 69 74 | 63 68 47 6c 75 65 2e 70 |..ICSwit|chGlue.p|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 50 4a 4d | 4d 01 00 00 00 00 00 00 |.TEXTPJM|M.......|
|00000050| 00 00 00 00 00 9e ea 00 | 00 47 ee ae 0f 3f c6 ae |........|.G...?..|
|00000060| 0f 3f c6 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.?......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f2 38 00 00 |........|.....8..|
|00000080| 75 6e 69 74 20 49 43 53 | 77 69 74 63 68 47 6c 75 |unit ICS|witchGlu|
|00000090| 65 3b 0d 0d 28 2a 20 a5 | a5 a5 53 74 61 72 74 20 |e;..(* .|..Start |
|000000a0| 48 65 61 64 65 72 a5 a5 | a5 20 2a 29 0d 0d 28 2a |Header..|. *)..(*|
|000000b0| 20 46 69 6c 65 3a 20 20 | 20 20 20 20 20 20 20 49 | File: | I|
|000000c0| 43 53 77 69 74 63 68 47 | 6c 75 65 2e 70 20 28 69 |CSwitchG|lue.p (i|
|000000d0| 6d 70 6c 29 0d 20 2a 20 | 47 65 6e 65 72 61 74 65 |mpl). * |Generate|
|000000e0| 64 20 62 79 3a 20 31 2e | 30 64 34 0d 20 2a 20 46 |d by: 1.|0d4. * F|
|000000f0| 6f 72 3a 20 20 20 20 20 | 20 20 20 20 20 49 43 20 |or: | IC |
|00000100| 31 2e 33 0d 20 2a 20 4f | 6e 3a 20 20 20 20 20 20 |1.3. * O|n: |
|00000110| 20 20 20 20 20 53 75 6e | 64 61 79 2c 20 31 34 20 | Sun|day, 14 |
|00000120| 4a 75 6c 79 20 31 39 39 | 36 2c 20 32 30 3a 31 39 |July 199|6, 20:19|
|00000130| 3a 35 35 0d 20 2a 20 0d | 20 2a 20 54 68 69 73 20 |:55. * .| * This |
|00000140| 66 69 6c 65 20 69 73 20 | 70 61 72 74 20 6f 66 20 |file is |part of |
|00000150| 74 68 65 20 49 6e 74 65 | 72 6e 65 74 20 43 6f 6e |the Inte|rnet Con|
|00000160| 66 69 67 75 72 61 74 69 | 6f 6e 20 73 79 73 74 65 |figurati|on syste|
|00000170| 6d 20 61 6e 64 0d 20 2a | 20 69 73 20 70 6c 61 63 |m and. *| is plac|
|00000180| 65 64 20 69 6e 20 74 68 | 65 20 70 75 62 6c 69 63 |ed in th|e public|
|00000190| 20 64 6f 6d 61 69 6e 20 | 66 6f 72 20 74 68 65 20 | domain |for the |
|000001a0| 62 65 6e 65 66 69 74 20 | 6f 66 20 61 6c 6c 2e 0d |benefit |of all..|
|000001b0| 20 2a 29 0d 0d 28 2a 20 | a5 a5 a5 45 6e 64 20 48 | *)..(* |...End H|
|000001c0| 65 61 64 65 72 a5 a5 a5 | 20 2a 29 0d 0d 69 6e 74 |eader...| *)..int|
|000001d0| 65 72 66 61 63 65 0d 0d | 09 75 73 65 73 0d 7b 24 |erface..|.uses.{$|
|000001e0| 69 66 63 20 75 6e 64 65 | 66 69 6e 65 64 20 54 48 |ifc unde|fined TH|
|000001f0| 49 4e 4b 5f 50 61 73 63 | 61 6c 7d 0d 09 09 54 79 |INK_Pasc|al}...Ty|
|00000200| 70 65 73 2c 20 46 69 6c | 65 73 2c 20 51 75 69 63 |pes, Fil|es, Quic|
|00000210| 6b 44 72 61 77 2c 20 41 | 70 70 6c 65 54 61 6c 6b |kDraw, A|ppleTalk|
|00000220| 2c 20 41 6c 69 61 73 65 | 73 2c 20 0d 7b 24 65 6e |, Aliase|s, .{$en|
|00000230| 64 63 7d 0d 09 09 49 43 | 54 79 70 65 73 2c 20 49 |dc}...IC|Types, I|
|00000240| 43 4b 65 79 73 3b 0d 0d | 28 2a 20 a5 a5 a5 53 74 |CKeys;..|(* ...St|
|00000250| 61 72 74 20 49 43 41 50 | 49 2e 70 a5 a5 a5 20 2a |art ICAP|I.p... *|
|00000260| 29 0d 0d 20 20 28 2a 20 | 2a 2a 2a 2a 2a 20 53 74 |).. (* |***** St|
|00000270| 61 72 74 69 6e 67 20 55 | 70 20 61 6e 64 20 53 68 |arting U|p and Sh|
|00000280| 75 74 74 69 6e 67 20 44 | 6f 77 6e 20 2a 2a 2a 2a |utting D|own ****|
|00000290| 2a 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 |* *). .| functi|
|000002a0| 6f 6e 20 49 43 53 74 61 | 72 74 28 76 61 72 20 69 |on ICSta|rt(var i|
|000002b0| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|000002c0| 3b 20 63 72 65 61 74 6f | 72 20 3a 20 4f 53 54 79 |; creato|r : OSTy|
|000002d0| 70 65 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |pe) : IC|Error;. |
|000002e0| 20 20 20 28 2a 20 43 61 | 6c 6c 20 74 68 69 73 20 | (* Ca|ll this |
|000002f0| 61 74 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 69 |at appli|cation i|
|00000300| 6e 69 74 69 61 6c 69 73 | 61 74 69 6f 6e 2e 20 53 |nitialis|ation. S|
|00000310| 65 74 20 63 72 65 61 74 | 6f 72 20 74 6f 20 79 6f |et creat|or to yo|
|00000320| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 0d 20 |ur appli|cation. |
|00000330| 20 20 20 20 2a 20 63 72 | 65 61 74 6f 72 20 74 6f | * cr|eator to|
|00000340| 20 61 6c 6c 6f 77 20 66 | 6f 72 20 66 75 74 75 72 | allow f|or futur|
|00000350| 65 20 65 78 70 61 6e 73 | 69 6f 6e 20 6f 66 20 74 |e expans|ion of t|
|00000360| 68 65 20 49 43 20 73 79 | 73 74 65 6d 2e 20 52 65 |he IC sy|stem. Re|
|00000370| 74 75 72 6e 73 0d 20 20 | 20 20 20 2a 20 69 6e 73 |turns. | * ins|
|00000380| 74 20 61 73 20 61 20 63 | 6f 6e 6e 65 63 74 69 6f |t as a c|onnectio|
|00000390| 6e 20 74 6f 20 74 68 65 | 20 49 43 20 73 79 73 74 |n to the| IC syst|
|000003a0| 65 6d 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |em.. | *). . |
|000003b0| 20 66 75 6e 63 74 69 6f | 6e 20 49 43 53 74 6f 70 | functio|n ICStop|
|000003c0| 28 69 6e 73 74 20 3a 20 | 49 43 49 6e 73 74 61 6e |(inst : |ICInstan|
|000003d0| 63 65 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |ce) : IC|Error;. |
|000003e0| 20 20 20 28 2a 20 49 74 | 20 69 73 20 69 6c 6c 65 | (* It| is ille|
|000003f0| 67 61 6c 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |gal to c|all this|
|00000400| 20 72 6f 75 74 69 6e 65 | 20 69 6e 73 69 64 65 20 | routine| inside |
|00000410| 61 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |a ICBegi|n/End pa|
|00000420| 69 72 2e 0d 20 20 20 20 | 20 2a 20 43 61 6c 6c 20 |ir.. | * Call |
|00000430| 74 68 69 73 20 61 74 20 | 61 70 70 6c 69 63 61 74 |this at |applicat|
|00000440| 69 6f 6e 20 69 6e 69 74 | 69 61 6c 69 73 61 74 69 |ion init|ialisati|
|00000450| 6f 6e 2c 20 61 66 74 65 | 72 20 77 68 69 63 68 20 |on, afte|r which |
|00000460| 69 6e 73 74 0d 20 20 20 | 20 20 2a 20 69 73 20 6e |inst. | * is n|
|00000470| 6f 20 6c 6f 6e 67 65 72 | 20 76 61 6c 69 64 20 63 |o longer| valid c|
|00000480| 6f 6e 6e 65 63 74 69 6f | 6e 20 74 6f 20 49 43 2e |onnectio|n to IC.|
|00000490| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 28 2a |. *)|. . (*|
|000004a0| 20 2a 2a 2a 2a 2a 20 53 | 70 65 63 69 66 79 69 6e | ***** S|pecifyin|
|000004b0| 67 20 61 20 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |g a Conf|iguratio|
|000004c0| 6e 20 2a 2a 2a 2a 2a 20 | 2a 29 0d 20 20 0d 20 20 |n ***** |*). . |
|000004d0| 66 75 6e 63 74 69 6f 6e | 20 49 43 46 69 6e 64 43 |function| ICFindC|
|000004e0| 6f 6e 66 69 67 46 69 6c | 65 28 69 6e 73 74 20 3a |onfigFil|e(inst :|
|000004f0| 20 49 43 49 6e 73 74 61 | 6e 63 65 3b 20 63 6f 75 | ICInsta|nce; cou|
|00000500| 6e 74 20 3a 20 69 6e 74 | 65 67 65 72 3b 20 66 6f |nt : int|eger; fo|
|00000510| 6c 64 65 72 73 20 3a 20 | 49 43 44 69 72 53 70 65 |lders : |ICDirSpe|
|00000520| 63 41 72 72 61 79 50 74 | 72 29 20 3a 20 49 43 45 |cArrayPt|r) : ICE|
|00000530| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 49 74 20 |rror;. | (* It |
|00000540| 69 73 20 69 6c 6c 65 67 | 61 6c 20 74 6f 20 63 61 |is illeg|al to ca|
|00000550| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |ll this |routine |
|00000560| 69 6e 73 69 64 65 20 61 | 20 49 43 42 65 67 69 6e |inside a| ICBegin|
|00000570| 2f 45 6e 64 20 70 61 69 | 72 2e 0d 20 20 20 20 20 |/End pai|r.. |
|00000580| 2a 20 43 61 6c 6c 20 74 | 6f 20 63 6f 6e 66 69 67 |* Call t|o config|
|00000590| 75 72 65 20 74 68 69 73 | 20 63 6f 6e 6e 65 63 74 |ure this| connect|
|000005a0| 69 6f 6e 20 74 6f 20 49 | 43 2e 0d 20 20 20 20 20 |ion to I|C.. |
|000005b0| 2a 20 53 65 74 20 63 6f | 75 6e 74 20 61 73 20 74 |* Set co|unt as t|
|000005c0| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 76 61 6c |he numbe|r of val|
|000005d0| 69 64 20 65 6c 65 6d 65 | 6e 74 73 20 69 6e 20 66 |id eleme|nts in f|
|000005e0| 6f 6c 64 65 72 73 2e 0d | 20 20 20 20 20 2a 20 53 |olders..| * S|
|000005f0| 65 74 20 66 6f 6c 64 65 | 72 73 20 74 6f 20 61 20 |et folde|rs to a |
|00000600| 70 6f 69 6e 74 65 72 20 | 74 6f 20 74 68 65 20 66 |pointer |to the f|
|00000610| 6f 6c 64 65 72 73 20 74 | 6f 20 73 65 61 72 63 68 |olders t|o search|
|00000620| 2e 0d 20 20 20 20 20 2a | 20 53 65 74 74 69 6e 67 |.. *| Setting|
|00000630| 20 63 6f 75 6e 74 20 74 | 6f 20 30 20 61 6e 64 20 | count t|o 0 and |
|00000640| 66 6f 6c 64 65 72 73 20 | 74 6f 20 6e 69 6c 20 69 |folders |to nil i|
|00000650| 73 20 4f 4b 2e 0d 20 20 | 20 20 20 2a 20 53 65 61 |s OK.. | * Sea|
|00000660| 72 63 68 65 73 20 74 68 | 65 20 73 70 65 63 69 66 |rches th|e specif|
|00000670| 69 65 64 20 66 6f 6c 64 | 65 72 73 20 61 6e 64 20 |ied fold|ers and |
|00000680| 74 68 65 6e 20 74 68 65 | 20 50 72 65 66 65 72 65 |then the| Prefere|
|00000690| 6e 63 65 73 20 66 6f 6c | 64 65 72 0d 20 20 20 20 |nces fol|der. |
|000006a0| 20 2a 20 69 6e 20 61 20 | 75 6e 73 70 65 63 69 66 | * in a |unspecif|
|000006b0| 69 65 64 20 6d 61 6e 6e | 65 72 2e 0d 20 20 20 20 |ied mann|er.. |
|000006c0| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|000006d0| 6e 20 49 43 46 69 6e 64 | 55 73 65 72 43 6f 6e 66 |n ICFind|UserConf|
|000006e0| 69 67 46 69 6c 65 28 69 | 6e 73 74 20 3a 20 49 43 |igFile(i|nst : IC|
|000006f0| 49 6e 73 74 61 6e 63 65 | 3b 20 76 61 72 20 77 68 |Instance|; var wh|
|00000700| 65 72 65 20 3a 20 49 43 | 44 69 72 53 70 65 63 29 |ere : IC|DirSpec)|
|00000710| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 20 20 | : ICErr|or;. |
|00000720| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|00000730| 2e 31 2e 0d 20 20 20 20 | 20 2a 20 49 74 20 69 73 |.1.. | * It is|
|00000740| 20 69 6c 6c 65 67 61 6c | 20 74 6f 20 63 61 6c 6c | illegal| to call|
|00000750| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 6e | this ro|utine in|
|00000760| 73 69 64 65 20 61 20 49 | 43 42 65 67 69 6e 2f 45 |side a I|CBegin/E|
|00000770| 6e 64 20 70 61 69 72 2e | 0d 20 20 20 20 20 2a 20 |nd pair.|. * |
|00000780| 53 69 6d 69 6c 61 72 20 | 74 6f 20 49 43 46 69 6e |Similar |to ICFin|
|00000790| 64 43 6f 6e 66 69 67 46 | 69 6c 65 20 65 78 63 65 |dConfigF|ile exce|
|000007a0| 70 74 20 74 68 61 74 20 | 69 74 20 6f 6e 6c 79 20 |pt that |it only |
|000007b0| 73 65 61 72 63 68 65 73 | 20 74 68 65 20 66 6f 6c |searches| the fol|
|000007c0| 64 65 72 0d 20 20 20 20 | 20 2a 20 73 70 65 63 69 |der. | * speci|
|000007d0| 66 69 65 64 20 69 6e 20 | 77 68 65 72 65 2e 20 20 |fied in |where. |
|000007e0| 49 66 20 74 68 65 20 69 | 6e 70 75 74 20 70 61 72 |If the i|nput par|
|000007f0| 61 6d 65 74 65 72 73 20 | 61 72 65 20 76 61 6c 69 |ameters |are vali|
|00000800| 64 20 74 68 65 20 72 6f | 75 74 69 6e 65 0d 20 20 |d the ro|utine. |
|00000810| 20 20 20 2a 20 77 69 6c | 6c 20 61 6c 77 61 79 73 | * wil|l always|
|00000820| 20 73 75 63 63 65 73 73 | 66 75 6c 20 63 6f 6e 66 | success|ful conf|
|00000830| 69 67 75 72 65 20 74 68 | 65 20 69 6e 73 74 61 6e |igure th|e instan|
|00000840| 63 65 2c 20 63 72 65 61 | 74 69 6e 67 20 61 6e 0d |ce, crea|ting an.|
|00000850| 20 20 20 20 20 2a 20 65 | 6d 70 74 79 20 63 6f 6e | * e|mpty con|
|00000860| 66 69 67 75 72 61 74 69 | 6f 6e 20 69 66 20 6e 65 |figurati|on if ne|
|00000870| 63 65 73 73 61 72 79 0d | 20 20 20 20 20 2a 20 46 |cessary.| * F|
|00000880| 6f 72 20 75 73 65 20 77 | 69 74 68 20 64 6f 75 62 |or use w|ith doub|
|00000890| 6c 65 2d 63 6c 69 63 6b | 61 62 6c 65 20 70 72 65 |le-click|able pre|
|000008a0| 66 65 72 65 6e 63 65 20 | 66 69 6c 65 73 2e 0d 20 |ference |files.. |
|000008b0| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|000008c0| 74 69 6f 6e 20 49 43 47 | 65 6e 65 72 61 6c 46 69 |tion ICG|eneralFi|
|000008d0| 6e 64 43 6f 6e 66 69 67 | 46 69 6c 65 28 69 6e 73 |ndConfig|File(ins|
|000008e0| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|000008f0| 73 65 61 72 63 68 5f 70 | 72 65 66 73 20 3a 20 42 |search_p|refs : B|
|00000900| 6f 6f 6c 65 61 6e 3b 20 | 63 61 6e 5f 63 72 65 61 |oolean; |can_crea|
|00000910| 74 65 20 3a 20 42 6f 6f | 6c 65 61 6e 3b 20 63 6f |te : Boo|lean; co|
|00000920| 75 6e 74 20 3a 20 69 6e | 74 65 67 65 72 3b 20 66 |unt : in|teger; f|
|00000930| 6f 6c 64 65 72 73 20 3a | 20 49 43 44 69 72 53 70 |olders :| ICDirSp|
|00000940| 65 63 41 72 72 61 79 50 | 74 72 29 20 3a 20 49 43 |ecArrayP|tr) : IC|
|00000950| 45 72 72 6f 72 3b 0d 20 | 20 20 20 28 2a 20 52 65 |Error;. | (* Re|
|00000960| 71 75 69 72 65 73 20 49 | 43 20 31 2e 32 2e 0d 20 |quires I|C 1.2.. |
|00000970| 20 20 20 20 2a 20 49 74 | 20 69 73 20 69 6c 6c 65 | * It| is ille|
|00000980| 67 61 6c 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |gal to c|all this|
|00000990| 20 72 6f 75 74 69 6e 65 | 20 69 6e 73 69 64 65 20 | routine| inside |
|000009a0| 61 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |a ICBegi|n/End pa|
|000009b0| 69 72 2e 0d 20 20 20 20 | 20 2a 20 43 61 6c 6c 20 |ir.. | * Call |
|000009c0| 74 6f 20 63 6f 6e 66 69 | 67 75 72 65 20 74 68 69 |to confi|gure thi|
|000009d0| 73 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 74 6f 20 |s connec|tion to |
|000009e0| 49 43 2e 0d 20 20 20 20 | 20 2a 20 54 68 69 73 20 |IC.. | * This |
|000009f0| 72 6f 75 74 69 6e 65 20 | 61 63 74 73 20 61 73 20 |routine |acts as |
|00000a00| 61 20 6d 6f 72 65 20 67 | 65 6e 65 72 61 6c 20 72 |a more g|eneral r|
|00000a10| 65 70 6c 61 63 65 6d 65 | 6e 74 20 66 6f 72 0d 20 |eplaceme|nt for. |
|00000a20| 20 20 20 20 2a 20 49 43 | 46 69 6e 64 43 6f 6e 66 | * IC|FindConf|
|00000a30| 69 67 46 69 6c 65 20 61 | 6e 64 20 49 43 46 69 6e |igFile a|nd ICFin|
|00000a40| 64 55 73 65 72 43 6f 6e | 66 69 67 46 69 6c 65 2e |dUserCon|figFile.|
|00000a50| 0d 20 20 20 20 20 2a 20 | 53 65 74 20 73 65 61 72 |. * |Set sear|
|00000a60| 63 68 5f 70 72 65 66 73 | 20 74 6f 20 74 72 75 65 |ch_prefs| to true|
|00000a70| 20 69 66 20 79 6f 75 20 | 77 61 6e 74 20 69 74 20 | if you |want it |
|00000a80| 74 6f 20 73 65 61 72 63 | 68 20 74 68 65 20 70 72 |to searc|h the pr|
|00000a90| 65 66 65 72 65 6e 63 65 | 73 20 66 6f 6c 64 65 72 |eference|s folder|
|00000aa0| 2e 0d 20 20 20 20 20 2a | 20 53 65 74 20 63 61 6e |.. *| Set can|
|00000ab0| 5f 63 72 65 61 74 65 20 | 74 6f 20 74 72 75 65 20 |_create |to true |
|00000ac0| 69 66 20 79 6f 75 20 77 | 61 6e 74 20 69 74 20 74 |if you w|ant it t|
|00000ad0| 6f 20 62 65 20 61 62 6c | 65 20 74 6f 20 63 72 65 |o be abl|e to cre|
|00000ae0| 61 74 65 20 61 20 6e 65 | 77 20 63 6f 6e 66 69 67 |ate a ne|w config|
|00000af0| 2e 0d 20 20 20 20 20 2a | 20 53 65 74 20 63 6f 75 |.. *| Set cou|
|00000b00| 6e 74 20 61 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |nt as th|e number|
|00000b10| 20 6f 66 20 76 61 6c 69 | 64 20 65 6c 65 6d 65 6e | of vali|d elemen|
|00000b20| 74 73 20 69 6e 20 66 6f | 6c 64 65 72 73 2e 0d 20 |ts in fo|lders.. |
|00000b30| 20 20 20 20 2a 20 53 65 | 74 20 66 6f 6c 64 65 72 | * Se|t folder|
|00000b40| 73 20 74 6f 20 61 20 70 | 6f 69 6e 74 65 72 20 74 |s to a p|ointer t|
|00000b50| 6f 20 74 68 65 20 66 6f | 6c 64 65 72 73 20 74 6f |o the fo|lders to|
|00000b60| 20 73 65 61 72 63 68 2e | 0d 20 20 20 20 20 2a 20 | search.|. * |
|00000b70| 53 65 74 74 69 6e 67 20 | 63 6f 75 6e 74 20 74 6f |Setting |count to|
|00000b80| 20 30 20 61 6e 64 20 66 | 6f 6c 64 65 72 73 20 74 | 0 and f|olders t|
|00000b90| 6f 20 6e 69 6c 20 69 73 | 20 4f 4b 2e 0d 20 20 20 |o nil is| OK.. |
|00000ba0| 20 20 2a 20 53 65 61 72 | 63 68 65 73 20 74 68 65 | * Sear|ches the|
|00000bb0| 20 73 70 65 63 69 66 69 | 65 64 20 66 6f 6c 64 65 | specifi|ed folde|
|00000bc0| 72 73 20 61 6e 64 20 74 | 68 65 6e 20 6f 70 74 69 |rs and t|hen opti|
|00000bd0| 6f 6e 61 6c 6c 79 20 74 | 68 65 20 50 72 65 66 65 |onally t|he Prefe|
|00000be0| 72 65 6e 63 65 73 20 66 | 6f 6c 64 65 72 0d 20 20 |rences f|older. |
|00000bf0| 20 20 20 2a 20 69 6e 20 | 61 20 75 6e 73 70 65 63 | * in |a unspec|
|00000c00| 69 66 69 65 64 20 6d 61 | 6e 6e 65 72 2e 0d 20 20 |ified ma|nner.. |
|00000c10| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00000c20| 69 6f 6e 20 49 43 43 68 | 6f 6f 73 65 43 6f 6e 66 |ion ICCh|ooseConf|
|00000c30| 69 67 28 69 6e 73 74 20 | 3a 20 49 43 49 6e 73 74 |ig(inst |: ICInst|
|00000c40| 61 6e 63 65 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |ance) : |ICError;|
|00000c50| 0d 20 20 20 20 28 2a 20 | 52 65 71 75 69 72 65 73 |. (* |Requires|
|00000c60| 20 49 43 20 31 2e 32 2e | 0d 20 20 20 20 20 2a 20 | IC 1.2.|. * |
|00000c70| 49 74 20 69 73 20 69 6c | 6c 65 67 61 6c 20 74 6f |It is il|legal to|
|00000c80| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00000c90| 6e 65 20 69 6e 73 69 64 | 65 20 61 20 49 43 42 65 |ne insid|e a ICBe|
|00000ca0| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 2e 0d 20 20 |gin/End |pair.. |
|00000cb0| 20 20 20 2a 20 52 65 71 | 75 65 73 74 73 20 74 68 | * Req|uests th|
|00000cc0| 65 20 75 73 65 72 20 74 | 6f 20 63 68 6f 6f 73 65 |e user t|o choose|
|00000cd0| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00000ce0| 2c 20 74 79 70 69 63 61 | 6c 6c 79 20 75 73 69 6e |, typica|lly usin|
|00000cf0| 67 20 73 6f 6d 65 0d 20 | 20 20 20 20 2a 20 73 6f |g some. | * so|
|00000d00| 72 74 20 6f 66 20 6d 6f | 64 61 6c 20 64 69 61 6c |rt of mo|dal dial|
|00000d10| 6f 67 2e 20 49 66 20 74 | 68 65 20 75 73 65 72 20 |og. If t|he user |
|00000d20| 63 61 6e 63 65 6c 73 20 | 74 68 65 20 64 69 61 6c |cancels |the dial|
|00000d30| 6f 67 20 74 68 65 20 63 | 6f 6e 66 69 67 75 72 61 |og the c|onfigura|
|00000d40| 74 69 6f 6e 0d 20 20 20 | 20 20 2a 20 73 74 61 74 |tion. | * stat|
|00000d50| 65 20 77 69 6c 6c 20 62 | 65 20 75 6e 61 66 66 65 |e will b|e unaffe|
|00000d60| 63 74 65 64 2e 0d 20 20 | 20 20 20 2a 29 0d 20 20 |cted.. | *). |
|00000d70| 0d 20 20 66 75 6e 63 74 | 69 6f 6e 20 49 43 43 68 |. funct|ion ICCh|
|00000d80| 6f 6f 73 65 4e 65 77 43 | 6f 6e 66 69 67 28 69 6e |ooseNewC|onfig(in|
|00000d90| 73 74 20 3a 20 49 43 49 | 6e 73 74 61 6e 63 65 29 |st : ICI|nstance)|
|00000da0| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 20 20 | : ICErr|or;. |
|00000db0| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|00000dc0| 2e 32 2e 0d 20 20 20 20 | 20 2a 20 49 74 20 69 73 |.2.. | * It is|
|00000dd0| 20 69 6c 6c 65 67 61 6c | 20 74 6f 20 63 61 6c 6c | illegal| to call|
|00000de0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 6e | this ro|utine in|
|00000df0| 73 69 64 65 20 61 20 49 | 43 42 65 67 69 6e 2f 45 |side a I|CBegin/E|
|00000e00| 6e 64 20 70 61 69 72 2e | 0d 20 20 20 20 20 2a 20 |nd pair.|. * |
|00000e10| 52 65 71 75 65 73 74 73 | 20 74 68 65 20 75 73 65 |Requests| the use|
|00000e20| 72 20 74 6f 20 63 72 65 | 61 74 65 20 61 20 6e 65 |r to cre|ate a ne|
|00000e30| 77 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 2c |w config|uration,|
|00000e40| 20 74 79 70 69 63 61 6c | 6c 79 20 75 73 69 6e 67 | typical|ly using|
|00000e50| 20 73 6f 6d 65 0d 20 20 | 20 20 20 2a 20 73 6f 72 | some. | * sor|
|00000e60| 74 20 6f 66 20 6d 6f 64 | 61 6c 20 64 69 61 6c 6f |t of mod|al dialo|
|00000e70| 67 2e 20 49 66 20 74 68 | 65 20 75 73 65 72 20 63 |g. If th|e user c|
|00000e80| 61 6e 63 65 6c 73 20 74 | 68 65 20 64 69 61 6c 6f |ancels t|he dialo|
|00000e90| 67 20 74 68 65 20 63 6f | 6e 66 69 67 75 72 61 74 |g the co|nfigurat|
|00000ea0| 69 6f 6e 0d 20 20 20 20 | 20 2a 20 73 74 61 74 65 |ion. | * state|
|00000eb0| 20 77 69 6c 6c 20 62 65 | 20 75 6e 61 66 66 65 63 | will be| unaffec|
|00000ec0| 74 65 64 2e 0d 20 20 20 | 20 20 2a 29 0d 20 20 0d |ted.. | *). .|
|00000ed0| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 47 65 74 | functi|on ICGet|
|00000ee0| 43 6f 6e 66 69 67 4e 61 | 6d 65 28 69 6e 73 74 20 |ConfigNa|me(inst |
|00000ef0| 3a 20 49 43 49 6e 73 74 | 61 6e 63 65 3b 20 6c 6f |: ICInst|ance; lo|
|00000f00| 6e 67 6e 61 6d 65 20 3a | 20 42 6f 6f 6c 65 61 6e |ngname :| Boolean|
|00000f10| 3b 20 76 61 72 20 6e 61 | 6d 65 20 3a 20 53 74 72 |; var na|me : Str|
|00000f20| 32 35 35 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |255) : I|CError;.|
|00000f30| 20 20 20 20 28 2a 20 52 | 65 71 75 69 72 65 73 20 | (* R|equires |
|00000f40| 49 43 20 31 2e 32 2e 0d | 20 20 20 20 20 2a 20 59 |IC 1.2..| * Y|
|00000f50| 6f 75 20 6d 75 73 74 20 | 73 70 65 63 69 66 79 20 |ou must |specify |
|00000f60| 61 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |a config|uration |
|00000f70| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 74 |before c|alling t|
|00000f80| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00000f90| 20 20 2a 20 52 65 74 75 | 72 6e 73 20 61 20 73 74 | * Retu|rns a st|
|00000fa0| 72 69 6e 67 20 74 68 61 | 74 20 64 65 73 63 72 69 |ring tha|t descri|
|00000fb0| 62 65 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |bes the |current |
|00000fc0| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 61 74 |configur|ation at|
|00000fd0| 20 61 20 75 73 65 72 0d | 20 20 20 20 20 2a 20 6c | a user.| * l|
|00000fe0| 65 76 65 6c 2e 20 53 65 | 74 20 6c 6f 6e 67 6e 61 |evel. Se|t longna|
|00000ff0| 6d 65 20 74 6f 20 74 72 | 75 65 20 69 66 20 79 6f |me to tr|ue if yo|
|00001000| 75 20 77 61 6e 74 20 61 | 20 6c 6f 6e 67 20 6e 61 |u want a| long na|
|00001010| 6d 65 2c 20 75 70 20 74 | 6f 20 32 35 35 0d 20 20 |me, up t|o 255. |
|00001020| 20 20 20 2a 20 63 68 61 | 72 61 63 74 65 72 73 2c | * cha|racters,|
|00001030| 20 6f 72 20 66 61 6c 73 | 65 20 69 66 20 79 6f 75 | or fals|e if you|
|00001040| 20 77 61 6e 74 20 61 20 | 73 68 6f 72 74 20 6e 61 | want a |short na|
|00001050| 6d 65 2c 20 74 79 70 69 | 63 61 6c 6c 79 20 61 62 |me, typi|cally ab|
|00001060| 6f 75 74 20 33 32 0d 20 | 20 20 20 20 2a 20 63 68 |out 32. | * ch|
|00001070| 61 72 61 63 74 65 72 73 | 2e 0d 20 20 20 20 20 2a |aracters|.. *|
|00001080| 20 54 68 65 20 72 65 74 | 75 72 6e 65 64 20 73 74 | The ret|urned st|
|00001090| 72 69 6e 67 20 69 73 20 | 66 6f 72 20 75 73 65 72 |ring is |for user|
|000010a0| 20 64 69 73 70 6c 61 79 | 20 6f 6e 6c 79 2e 20 49 | display| only. I|
|000010b0| 66 20 79 6f 75 20 72 65 | 6c 79 20 6f 6e 20 74 68 |f you re|ly on th|
|000010c0| 65 0d 20 20 20 20 20 2a | 20 65 78 61 63 74 20 66 |e. *| exact f|
|000010d0| 6f 72 6d 61 74 20 6f 66 | 20 69 74 2c 20 79 6f 75 |ormat of| it, you|
|000010e0| 20 77 69 6c 6c 20 63 6f | 6e 66 6c 69 63 74 20 77 | will co|nflict w|
|000010f0| 69 74 68 20 61 6e 79 20 | 66 75 74 75 72 65 20 49 |ith any |future I|
|00001100| 43 0d 20 20 20 20 20 2a | 20 69 6d 70 6c 65 6d 65 |C. *| impleme|
|00001110| 6e 74 61 74 69 6f 6e 20 | 74 68 61 74 20 64 6f 65 |ntation |that doe|
|00001120| 73 6e 27 74 20 75 73 65 | 20 65 78 70 6c 69 63 69 |sn't use| explici|
|00001130| 74 20 70 72 65 66 65 72 | 65 6e 63 65 20 66 69 6c |t prefer|ence fil|
|00001140| 65 73 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |es.. | *). . |
|00001150| 20 66 75 6e 63 74 69 6f | 6e 20 49 43 47 65 74 43 | functio|n ICGetC|
|00001160| 6f 6e 66 69 67 52 65 66 | 65 72 65 6e 63 65 28 69 |onfigRef|erence(i|
|00001170| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|00001180| 3b 20 72 65 66 20 3a 20 | 49 43 43 6f 6e 66 69 67 |; ref : |ICConfig|
|00001190| 52 65 66 48 61 6e 64 6c | 65 29 20 3a 20 49 43 45 |RefHandl|e) : ICE|
|000011a0| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 52 65 71 |rror;. | (* Req|
|000011b0| 75 69 72 65 73 20 49 43 | 20 31 2e 32 2e 0d 20 20 |uires IC| 1.2.. |
|000011c0| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|000011d0| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|000011e0| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|000011f0| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00001200| 65 2e 0d 20 20 20 20 20 | 2a 20 52 65 74 75 72 6e |e.. |* Return|
|00001210| 73 20 61 20 73 65 6c 66 | 2d 63 6f 6e 74 61 69 6e |s a self|-contain|
|00001220| 65 64 20 72 65 66 65 72 | 65 6e 63 65 20 74 6f 20 |ed refer|ence to |
|00001230| 74 68 65 20 69 6e 73 74 | 61 6e 63 65 27 73 20 63 |the inst|ance's c|
|00001240| 75 72 72 65 6e 74 0d 20 | 20 20 20 20 2a 20 63 6f |urrent. | * co|
|00001250| 6e 66 69 67 75 72 61 74 | 69 6f 6e 2e 0d 20 20 20 |nfigurat|ion.. |
|00001260| 20 20 2a 20 72 65 66 20 | 6d 75 73 74 20 62 65 20 | * ref |must be |
|00001270| 61 20 76 61 6c 69 64 20 | 6e 6f 6e 2d 6e 69 6c 20 |a valid |non-nil |
|00001280| 68 61 6e 64 6c 65 20 61 | 6e 64 20 69 74 20 77 69 |handle a|nd it wi|
|00001290| 6c 6c 20 62 65 20 72 65 | 73 69 7a 65 64 20 74 6f |ll be re|sized to|
|000012a0| 20 66 69 74 20 74 68 65 | 0d 20 20 20 20 20 2a 20 | fit the|. * |
|000012b0| 72 65 73 75 6c 74 69 6e | 67 20 64 61 74 61 2e 0d |resultin|g data..|
|000012c0| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|000012d0| 63 74 69 6f 6e 20 49 43 | 53 65 74 43 6f 6e 66 69 |ction IC|SetConfi|
|000012e0| 67 52 65 66 65 72 65 6e | 63 65 28 69 6e 73 74 20 |gReferen|ce(inst |
|000012f0| 3a 20 49 43 49 6e 73 74 | 61 6e 63 65 3b 20 72 65 |: ICInst|ance; re|
|00001300| 66 20 3a 20 49 43 43 6f | 6e 66 69 67 52 65 66 48 |f : ICCo|nfigRefH|
|00001310| 61 6e 64 6c 65 3b 20 66 | 6c 61 67 73 20 3a 20 6c |andle; f|lags : l|
|00001320| 6f 6e 67 69 6e 74 29 20 | 3a 20 49 43 45 72 72 6f |ongint) |: ICErro|
|00001330| 72 3b 0d 20 20 20 20 28 | 2a 20 52 65 71 75 69 72 |r;. (|* Requir|
|00001340| 65 73 20 49 43 20 31 2e | 32 2e 0d 20 20 20 20 20 |es IC 1.|2.. |
|00001350| 2a 20 49 74 20 69 73 20 | 69 6c 6c 65 67 61 6c 20 |* It is |illegal |
|00001360| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00001370| 74 69 6e 65 20 69 6e 73 | 69 64 65 20 61 20 49 43 |tine ins|ide a IC|
|00001380| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 2e 0d |Begin/En|d pair..|
|00001390| 20 20 20 20 20 2a 20 52 | 65 63 6f 6e 66 69 67 75 | * R|econfigu|
|000013a0| 72 65 73 20 74 68 65 20 | 69 6e 73 74 61 6e 63 65 |res the |instance|
|000013b0| 20 75 73 69 6e 67 20 61 | 20 63 6f 6e 66 69 67 75 | using a| configu|
|000013c0| 72 61 74 69 6f 6e 20 72 | 65 66 65 72 65 6e 63 65 |ration r|eference|
|000013d0| 20 74 68 61 74 20 77 61 | 73 0d 20 20 20 20 20 2a | that wa|s. *|
|000013e0| 20 67 6f 74 20 75 73 69 | 6e 67 20 49 43 47 65 74 | got usi|ng ICGet|
|000013f0| 43 6f 6e 66 69 67 52 65 | 66 65 72 65 6e 63 65 20 |ConfigRe|ference |
|00001400| 72 65 66 65 72 65 6e 63 | 65 2e 20 53 65 74 20 74 |referenc|e. Set t|
|00001410| 68 65 0d 20 20 20 20 20 | 2a 20 69 63 4e 6f 55 73 |he. |* icNoUs|
|00001420| 65 72 49 6e 74 65 72 61 | 63 74 69 6f 6e 5f 62 69 |erIntera|ction_bi|
|00001430| 74 20 69 6e 20 66 6c 61 | 67 73 20 69 66 20 79 6f |t in fla|gs if yo|
|00001440| 75 20 72 65 71 75 69 72 | 65 20 74 68 61 74 20 74 |u requir|e that t|
|00001450| 68 69 73 20 72 6f 75 74 | 69 6e 65 0d 20 20 20 20 |his rout|ine. |
|00001460| 20 2a 20 6e 6f 74 20 70 | 72 65 73 65 6e 74 20 61 | * not p|resent a|
|00001470| 20 6d 6f 64 61 6c 20 64 | 69 61 6c 6f 67 2e 20 4f | modal d|ialog. O|
|00001480| 74 68 65 72 20 66 6c 61 | 67 20 62 69 74 73 20 61 |ther fla|g bits a|
|00001490| 72 65 20 72 65 73 65 72 | 76 65 64 20 61 6e 64 20 |re reser|ved and |
|000014a0| 73 68 6f 75 6c 64 0d 20 | 20 20 20 20 2a 20 62 65 |should. | * be|
|000014b0| 20 73 65 74 20 74 6f 20 | 7a 65 72 6f 2e 0d 20 20 | set to |zero.. |
|000014c0| 20 20 20 2a 20 72 65 66 | 20 6d 75 73 74 20 6e 6f | * ref| must no|
|000014d0| 74 20 62 65 20 6e 69 6c | 2e 0d 20 20 20 20 20 2a |t be nil|.. *|
|000014e0| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|000014f0| 49 43 53 70 65 63 69 66 | 79 43 6f 6e 66 69 67 46 |ICSpecif|yConfigF|
|00001500| 69 6c 65 28 69 6e 73 74 | 20 3a 20 49 43 49 6e 73 |ile(inst| : ICIns|
|00001510| 74 61 6e 63 65 3b 20 76 | 61 72 20 63 6f 6e 66 69 |tance; v|ar confi|
|00001520| 67 20 3a 20 46 53 53 70 | 65 63 29 20 3a 20 49 43 |g : FSSp|ec) : IC|
|00001530| 45 72 72 6f 72 3b 0d 20 | 20 20 20 28 2a 20 49 74 |Error;. | (* It|
|00001540| 20 69 73 20 69 6c 6c 65 | 67 61 6c 20 74 6f 20 63 | is ille|gal to c|
|00001550| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00001560| 20 69 6e 73 69 64 65 20 | 61 20 49 43 42 65 67 69 | inside |a ICBegi|
|00001570| 6e 2f 45 6e 64 20 70 61 | 69 72 2e 0d 20 20 20 20 |n/End pa|ir.. |
|00001580| 20 2a 20 46 6f 72 20 75 | 73 65 20 6f 6e 6c 79 20 | * For u|se only |
|00001590| 62 79 20 74 68 65 20 49 | 43 20 61 70 70 6c 69 63 |by the I|C applic|
|000015a0| 61 74 69 6f 6e 2e 0d 20 | 20 20 20 20 2a 20 49 66 |ation.. | * If|
|000015b0| 20 79 6f 75 20 63 61 6c | 6c 20 74 68 69 73 20 72 | you cal|l this r|
|000015c0| 6f 75 74 69 6e 65 20 79 | 6f 75 72 73 65 6c 66 2c |outine y|ourself,|
|000015d0| 20 79 6f 75 20 77 69 6c | 6c 20 63 6f 6e 66 6c 69 | you wil|l confli|
|000015e0| 63 74 20 77 69 74 68 20 | 61 6e 79 0d 20 20 20 20 |ct with |any. |
|000015f0| 20 2a 20 66 75 74 75 72 | 65 20 49 43 20 69 6d 70 | * futur|e IC imp|
|00001600| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 74 68 61 74 |lementat|ion that|
|00001610| 20 64 6f 65 73 6e 27 74 | 20 75 73 65 20 65 78 70 | doesn't| use exp|
|00001620| 6c 69 63 69 74 20 70 72 | 65 66 65 72 65 6e 63 65 |licit pr|eference|
|00001630| 20 66 69 6c 65 73 2e 0d | 20 20 20 20 20 2a 29 0d | files..| *).|
|00001640| 20 20 0d 20 20 28 2a 20 | 2a 2a 2a 2a 2a 20 47 65 | . (* |***** Ge|
|00001650| 74 74 69 6e 67 20 49 6e | 66 6f 72 6d 61 74 69 6f |tting In|formatio|
|00001660| 6e 20 2a 2a 2a 2a 2a 20 | 2a 29 0d 20 20 0d 20 20 |n ***** |*). . |
|00001670| 66 75 6e 63 74 69 6f 6e | 20 49 43 47 65 74 53 65 |function| ICGetSe|
|00001680| 65 64 28 69 6e 73 74 20 | 3a 20 49 43 49 6e 73 74 |ed(inst |: ICInst|
|00001690| 61 6e 63 65 3b 20 76 61 | 72 20 73 65 65 64 20 3a |ance; va|r seed :|
|000016a0| 20 6c 6f 6e 67 69 6e 74 | 29 20 3a 20 49 43 45 72 | longint|) : ICEr|
|000016b0| 72 6f 72 3b 0d 20 20 20 | 20 28 2a 20 59 6f 75 20 |ror;. | (* You |
|000016c0| 64 6f 20 6e 6f 74 20 68 | 61 76 65 20 74 6f 20 73 |do not h|ave to s|
|000016d0| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|000016e0| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|000016f0| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00001700| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 64 |ne.. | * You d|
|00001710| 6f 20 6e 6f 74 20 68 61 | 76 65 20 74 6f 20 62 65 |o not ha|ve to be|
|00001720| 20 69 6e 73 69 64 65 20 | 61 6e 20 49 43 42 65 67 | inside |an ICBeg|
|00001730| 69 6e 2f 45 6e 64 20 70 | 61 69 72 20 74 6f 20 63 |in/End p|air to c|
|00001740| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00001750| 2e 0d 20 20 20 20 20 2a | 20 52 65 74 75 72 6e 73 |.. *| Returns|
|00001760| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 73 65 65 | the cur|rent see|
|00001770| 64 20 66 6f 72 20 74 68 | 65 20 49 43 20 70 72 65 |d for th|e IC pre|
|00001780| 66 73 20 64 61 74 61 62 | 61 73 65 2e 0d 20 20 20 |fs datab|ase.. |
|00001790| 20 20 2a 20 54 68 69 73 | 20 73 65 65 64 20 63 68 | * This| seed ch|
|000017a0| 61 6e 67 65 73 20 65 61 | 63 68 20 74 69 6d 65 20 |anges ea|ch time |
|000017b0| 61 20 6e 6f 6e 2d 76 6f | 6c 61 74 69 6c 65 20 70 |a non-vo|latile p|
|000017c0| 72 65 66 65 72 65 6e 63 | 65 20 69 73 20 63 68 61 |referenc|e is cha|
|000017d0| 6e 67 65 64 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 |nged.. | * You|
|000017e0| 20 63 61 6e 20 70 6f 6c | 6c 20 74 68 69 73 20 74 | can pol|l this t|
|000017f0| 6f 20 64 65 74 65 72 6d | 69 6e 65 20 69 66 20 61 |o determ|ine if a|
|00001800| 6e 79 20 63 61 63 68 65 | 64 20 70 72 65 66 65 72 |ny cache|d prefer|
|00001810| 65 6e 63 65 73 20 63 68 | 61 6e 67 65 2e 0d 20 20 |ences ch|ange.. |
|00001820| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00001830| 69 6f 6e 20 49 43 47 65 | 74 50 65 72 6d 28 69 6e |ion ICGe|tPerm(in|
|00001840| 73 74 20 3a 20 49 43 49 | 6e 73 74 61 6e 63 65 3b |st : ICI|nstance;|
|00001850| 20 76 61 72 20 70 65 72 | 6d 20 3a 20 49 43 50 65 | var per|m : ICPe|
|00001860| 72 6d 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |rm) : IC|Error;. |
|00001870| 20 20 20 28 2a 20 59 6f | 75 20 64 6f 20 6e 6f 74 | (* Yo|u do not|
|00001880| 20 68 61 76 65 20 74 6f | 20 73 70 65 63 69 66 79 | have to| specify|
|00001890| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|000018a0| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|000018b0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|000018c0| 20 20 20 2a 20 52 65 74 | 75 72 6e 73 20 74 68 65 | * Ret|urns the|
|000018d0| 20 61 63 63 65 73 73 20 | 70 65 72 6d 69 73 73 69 | access |permissi|
|000018e0| 6f 6e 73 20 63 75 72 72 | 65 6e 74 6c 79 20 61 73 |ons curr|ently as|
|000018f0| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 20 74 68 |sociated| with th|
|00001900| 69 73 20 69 6e 73 74 61 | 6e 63 65 2e 0d 20 20 20 |is insta|nce.. |
|00001910| 20 20 2a 20 57 68 69 6c | 65 20 61 70 70 6c 69 63 | * Whil|e applic|
|00001920| 61 74 69 6f 6e 73 20 6e | 6f 72 6d 61 6c 6c 79 20 |ations n|ormally |
|00001930| 6b 6e 6f 77 20 77 68 61 | 74 20 70 65 72 6d 69 73 |know wha|t permis|
|00001940| 73 69 6f 6e 73 20 74 68 | 65 79 20 68 61 76 65 2c |sions th|ey have,|
|00001950| 0d 20 20 20 20 20 2a 20 | 74 68 69 73 20 72 6f 75 |. * |this rou|
|00001960| 74 69 6e 65 20 69 73 20 | 64 65 73 69 67 6e 65 64 |tine is |designed|
|00001970| 20 66 6f 72 20 75 73 65 | 20 62 79 20 6f 76 65 72 | for use| by over|
|00001980| 72 69 64 65 20 63 6f 6d | 70 6f 6e 65 6e 74 73 2e |ride com|ponents.|
|00001990| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 66 75 |. *)|. . fu|
|000019a0| 6e 63 74 69 6f 6e 20 49 | 43 44 65 66 61 75 6c 74 |nction I|CDefault|
|000019b0| 46 69 6c 65 4e 61 6d 65 | 28 69 6e 73 74 20 3a 20 |FileName|(inst : |
|000019c0| 49 43 49 6e 73 74 61 6e | 63 65 3b 20 76 61 72 20 |ICInstan|ce; var |
|000019d0| 6e 61 6d 65 20 3a 20 53 | 74 72 36 33 29 20 3a 20 |name : S|tr63) : |
|000019e0| 49 43 45 72 72 6f 72 3b | 0d 20 20 20 20 28 2a 20 |ICError;|. (* |
|000019f0| 59 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |You do n|ot have |
|00001a00| 74 6f 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |to speci|fy a con|
|00001a10| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|00001a20| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00001a30| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 59 |outine..| * Y|
|00001a40| 6f 75 20 64 6f 20 6e 6f | 74 20 68 61 76 65 20 74 |ou do no|t have t|
|00001a50| 6f 20 62 65 20 69 6e 73 | 69 64 65 20 61 6e 20 49 |o be ins|ide an I|
|00001a60| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 20 |CBegin/E|nd pair |
|00001a70| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00001a80| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 52 65 74 |tine.. | * Ret|
|00001a90| 75 72 6e 73 20 74 68 65 | 20 64 65 66 61 75 6c 74 |urns the| default|
|00001aa0| 20 66 69 6c 65 20 6e 61 | 6d 65 20 66 6f 72 20 49 | file na|me for I|
|00001ab0| 43 20 70 72 65 66 65 72 | 65 6e 63 65 20 66 69 6c |C prefer|ence fil|
|00001ac0| 65 73 2e 0d 20 20 20 20 | 20 2a 20 41 70 70 6c 69 |es.. | * Appli|
|00001ad0| 63 61 74 69 6f 6e 73 20 | 73 68 6f 75 6c 64 20 6e |cations |should n|
|00001ae0| 65 76 65 72 20 6e 65 65 | 64 20 74 6f 20 63 61 6c |ever nee|d to cal|
|00001af0| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |l this r|outine..|
|00001b00| 20 20 20 20 20 2a 20 49 | 66 20 79 6f 75 20 72 65 | * I|f you re|
|00001b10| 6c 79 20 6f 6e 20 69 6e | 66 6f 72 6d 61 74 69 6f |ly on in|formatio|
|00001b20| 6e 20 72 65 74 75 72 6e | 65 64 20 62 79 20 74 68 |n return|ed by th|
|00001b30| 69 73 20 72 6f 75 74 69 | 6e 65 20 79 6f 75 72 73 |is routi|ne yours|
|00001b40| 65 6c 66 2c 0d 20 20 20 | 20 20 2a 20 79 6f 75 20 |elf,. | * you |
|00001b50| 6d 61 79 20 63 6f 6e 66 | 6c 69 63 74 20 77 69 74 |may conf|lict wit|
|00001b60| 68 20 61 6e 79 20 66 75 | 74 75 72 65 20 49 43 20 |h any fu|ture IC |
|00001b70| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 74 |implemen|tation t|
|00001b80| 68 61 74 20 64 6f 65 73 | 6e 27 74 20 75 73 65 0d |hat does|n't use.|
|00001b90| 20 20 20 20 20 2a 20 65 | 78 70 6c 69 63 69 74 20 | * e|xplicit |
|00001ba0| 70 72 65 66 65 72 65 6e | 63 65 20 66 69 6c 65 73 |preferen|ce files|
|00001bb0| 2e 0d 20 20 20 20 20 2a | 20 54 68 65 20 63 6f 6d |.. *| The com|
|00001bc0| 70 6f 6e 65 6e 74 20 63 | 61 6c 6c 73 20 74 68 69 |ponent c|alls thi|
|00001bd0| 73 20 72 6f 75 74 69 6e | 65 20 74 6f 20 73 65 74 |s routin|e to set|
|00001be0| 20 75 70 20 74 68 65 20 | 64 65 66 61 75 6c 74 20 | up the |default |
|00001bf0| 49 43 20 66 69 6c 65 20 | 6e 61 6d 65 2e 0d 20 20 |IC file |name.. |
|00001c00| 20 20 20 2a 20 54 68 69 | 73 20 61 6c 6c 6f 77 73 | * Thi|s allows|
|00001c10| 20 74 68 69 73 20 6f 70 | 65 72 61 74 69 6f 6e 20 | this op|eration |
|00001c20| 74 6f 20 62 65 20 69 6e | 74 65 72 63 65 70 74 65 |to be in|tercepte|
|00001c30| 64 20 62 79 20 61 20 63 | 6f 6d 70 6f 6e 65 6e 74 |d by a c|omponent|
|00001c40| 20 74 68 61 74 20 68 61 | 73 0d 20 20 20 20 20 2a | that ha|s. *|
|00001c50| 20 63 61 70 74 75 72 65 | 64 20 75 73 2e 20 49 74 | capture|d us. It|
|00001c60| 20 63 75 72 72 65 6e 74 | 6c 79 20 67 65 74 73 20 | current|ly gets |
|00001c70| 69 74 20 66 72 6f 6d 20 | 74 68 65 20 63 6f 6d 70 |it from |the comp|
|00001c80| 6f 6e 65 6e 74 20 72 65 | 73 6f 75 72 63 65 20 66 |onent re|source f|
|00001c90| 69 6c 65 2e 0d 20 20 20 | 20 20 2a 20 54 68 65 20 |ile.. | * The |
|00001ca0| 67 6c 75 65 20 76 65 72 | 73 69 6f 6e 20 69 73 20 |glue ver|sion is |
|00001cb0| 68 61 72 64 77 69 72 65 | 64 20 74 6f 20 22 49 6e |hardwire|d to "In|
|00001cc0| 74 65 72 6e 65 74 20 50 | 72 65 66 65 72 65 6e 63 |ternet P|referenc|
|00001cd0| 65 73 22 2e 0d 20 20 20 | 20 20 2a 29 0d 20 20 0d |es".. | *). .|
|00001ce0| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 47 65 74 | functi|on ICGet|
|00001cf0| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 73 74 61 6e 63 |Componen|tInstanc|
|00001d00| 65 28 69 6e 73 74 20 3a | 20 49 43 49 6e 73 74 61 |e(inst :| ICInsta|
|00001d10| 6e 63 65 3b 20 76 61 72 | 20 63 6f 6d 70 6f 6e 65 |nce; var| compone|
|00001d20| 6e 74 5f 69 6e 73 74 20 | 3a 20 75 6e 69 76 20 50 |nt_inst |: univ P|
|00001d30| 74 72 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |tr) : IC|Error;. |
|00001d40| 20 20 20 28 2a 20 52 65 | 71 75 69 72 65 73 20 49 | (* Re|quires I|
|00001d50| 43 20 31 2e 32 2e 0d 20 | 20 20 20 20 2a 20 59 6f |C 1.2.. | * Yo|
|00001d60| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 6f |u do not| have to|
|00001d70| 20 73 70 65 63 69 66 79 | 20 61 20 63 6f 6e 66 69 | specify| a confi|
|00001d80| 67 75 72 61 74 69 6f 6e | 20 62 65 66 6f 72 65 20 |guration| before |
|00001d90| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|00001da0| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 |tine.. | * You|
|00001db0| 20 64 6f 20 6e 6f 74 20 | 68 61 76 65 20 74 6f 20 | do not |have to |
|00001dc0| 62 65 20 69 6e 73 69 64 | 65 20 61 6e 20 49 43 42 |be insid|e an ICB|
|00001dd0| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 20 74 6f |egin/End| pair to|
|00001de0| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00001df0| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |ne.. | * Retur|
|00001e00| 6e 73 20 6e 6f 45 72 72 | 20 61 6e 64 20 74 68 65 |ns noErr| and the|
|00001e10| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 74 6f 20 74 | connect|ion to t|
|00001e20| 68 65 20 49 43 20 63 6f | 6d 70 6f 6e 65 6e 74 2c |he IC co|mponent,|
|00001e30| 0d 20 20 20 20 20 2a 20 | 69 66 20 77 65 27 72 65 |. * |if we're|
|00001e40| 20 75 73 69 6e 67 20 74 | 68 65 20 63 6f 6d 70 6f | using t|he compo|
|00001e50| 6e 65 6e 74 2e 0d 20 20 | 20 20 20 2a 20 52 65 74 |nent.. | * Ret|
|00001e60| 75 72 6e 73 20 62 61 64 | 43 6f 6d 70 6f 6e 65 6e |urns bad|Componen|
|00001e70| 49 6e 73 74 61 6e 63 65 | 20 61 6e 64 20 6e 69 6c |Instance| and nil|
|00001e80| 20 69 66 20 77 65 27 72 | 65 20 6f 70 65 72 61 74 | if we'r|e operat|
|00001e90| 69 6e 67 20 77 69 74 68 | 20 67 6c 75 65 2e 0d 20 |ing with| glue.. |
|00001ea0| 20 20 20 20 2a 20 54 68 | 65 20 63 6f 6d 70 6f 6e | * Th|e compon|
|00001eb0| 65 6e 74 5f 69 6e 73 74 | 20 70 61 72 61 6d 65 74 |ent_inst| paramet|
|00001ec0| 65 72 20 69 73 20 61 20 | 75 6e 69 76 65 72 73 61 |er is a |universa|
|00001ed0| 6c 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 61 76 6f |l pointe|r to avo|
|00001ee0| 69 64 0d 20 20 20 20 20 | 2a 20 75 73 20 68 61 76 |id. |* us hav|
|00001ef0| 69 6e 67 20 74 6f 20 69 | 6e 63 6c 75 64 65 20 43 |ing to i|nclude C|
|00001f00| 6f 6d 70 6f 6e 65 6e 74 | 2e 5b 70 68 5d 20 28 77 |omponent|.[ph] (w|
|00001f10| 68 69 63 68 20 69 73 20 | 6e 6f 74 20 61 76 61 69 |hich is |not avai|
|00001f20| 6c 61 62 6c 65 20 75 6e | 64 65 72 0d 20 20 20 20 |lable un|der. |
|00001f30| 20 2a 20 73 6f 6d 65 20 | 64 65 76 65 6c 6f 70 6d | * some |developm|
|00001f40| 65 6e 74 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 |ent envi|ronments|
|00001f50| 29 20 69 6e 20 6f 72 64 | 65 72 20 74 6f 20 75 73 |) in ord|er to us|
|00001f60| 65 20 49 43 2e 0d 20 20 | 20 20 20 2a 29 0d 20 20 |e IC.. | *). |
|00001f70| 0d 20 20 28 2a 20 2a 2a | 2a 2a 2a 20 52 65 61 64 |. (* **|*** Read|
|00001f80| 69 6e 67 20 61 6e 64 20 | 57 72 69 74 69 6e 67 20 |ing and |Writing |
|00001f90| 50 72 65 66 65 72 65 6e | 63 65 73 20 2a 2a 2a 2a |Preferen|ces ****|
|00001fa0| 2a 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 |* *). .| functi|
|00001fb0| 6f 6e 20 49 43 42 65 67 | 69 6e 28 69 6e 73 74 20 |on ICBeg|in(inst |
|00001fc0| 3a 20 49 43 49 6e 73 74 | 61 6e 63 65 3b 20 70 65 |: ICInst|ance; pe|
|00001fd0| 72 6d 20 3a 20 49 43 50 | 65 72 6d 29 20 3a 20 49 |rm : ICP|erm) : I|
|00001fe0| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 59 |CError;.| (* Y|
|00001ff0| 6f 75 20 6d 75 73 74 20 | 73 70 65 63 69 66 79 20 |ou must |specify |
|00002000| 61 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |a config|uration |
|00002010| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 74 |before c|alling t|
|00002020| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00002030| 20 20 2a 20 49 74 20 69 | 73 20 69 6c 6c 65 67 61 | * It i|s illega|
|00002040| 6c 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |l to cal|l this r|
|00002050| 6f 75 74 69 6e 65 20 69 | 6e 73 69 64 65 20 61 20 |outine i|nside a |
|00002060| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00002070| 2e 0d 20 20 20 20 20 2a | 20 53 74 61 72 74 69 6e |.. *| Startin|
|00002080| 67 20 72 65 61 64 69 6e | 67 20 6f 72 20 77 72 69 |g readin|g or wri|
|00002090| 74 69 6e 67 20 6d 75 6c | 74 69 70 6c 65 20 70 72 |ting mul|tiple pr|
|000020a0| 65 66 65 72 65 6e 63 65 | 73 2e 0d 20 20 20 20 20 |eference|s.. |
|000020b0| 2a 20 41 20 63 61 6c 6c | 20 74 6f 20 74 68 69 73 |* A call| to this|
|000020c0| 20 6d 75 73 74 20 62 65 | 20 62 61 6c 61 6e 63 65 | must be| balance|
|000020d0| 64 20 62 79 20 61 20 63 | 61 6c 6c 20 74 6f 20 49 |d by a c|all to I|
|000020e0| 43 45 6e 64 2e 0d 20 20 | 20 20 20 2a 20 44 6f 20 |CEnd.. | * Do |
|000020f0| 6e 6f 74 20 63 61 6c 6c | 20 57 61 69 74 4e 65 78 |not call| WaitNex|
|00002100| 74 45 76 65 6e 74 20 62 | 65 74 77 65 65 6e 20 74 |tEvent b|etween t|
|00002110| 68 65 73 65 20 63 61 6c | 6c 73 2e 0d 20 20 20 20 |hese cal|ls.. |
|00002120| 20 2a 20 54 68 65 20 70 | 65 72 6d 20 73 70 65 63 | * The p|erm spec|
|00002130| 69 66 69 65 73 20 77 68 | 65 74 68 65 72 20 79 6f |ifies wh|ether yo|
|00002140| 75 20 69 6e 74 65 6e 64 | 20 74 6f 20 72 65 61 64 |u intend| to read|
|00002150| 20 6f 72 20 72 65 61 64 | 2f 77 72 69 74 65 2e 0d | or read|/write..|
|00002160| 20 20 20 20 20 2a 20 4f | 6e 6c 79 20 6f 6e 65 20 | * O|nly one |
|00002170| 77 72 69 74 65 72 20 69 | 73 20 61 6c 6c 6f 77 65 |writer i|s allowe|
|00002180| 64 20 70 65 72 20 69 6e | 73 74 61 6e 63 65 2e 0d |d per in|stance..|
|00002190| 20 20 20 20 20 2a 20 4e | 6f 74 65 20 74 68 61 74 | * N|ote that|
|000021a0| 20 74 68 69 73 20 6d 61 | 79 20 6f 70 65 6e 20 72 | this ma|y open r|
|000021b0| 65 73 6f 75 72 63 65 20 | 66 69 6c 65 73 20 74 68 |esource |files th|
|000021c0| 61 74 20 61 72 65 20 6e | 6f 74 20 63 6c 6f 73 65 |at are n|ot close|
|000021d0| 64 0d 20 20 20 20 20 2a | 20 75 6e 74 69 6c 20 79 |d. *| until y|
|000021e0| 6f 75 20 63 61 6c 6c 20 | 49 43 45 6e 64 2e 0d 20 |ou call |ICEnd.. |
|000021f0| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00002200| 74 69 6f 6e 20 49 43 47 | 65 74 50 72 65 66 28 69 |tion ICG|etPref(i|
|00002210| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|00002220| 3b 20 6b 65 79 20 3a 20 | 53 74 72 32 35 35 3b 20 |; key : |Str255; |
|00002230| 76 61 72 20 61 74 74 72 | 20 3a 20 49 43 41 74 74 |var attr| : ICAtt|
|00002240| 72 3b 20 62 75 66 20 3a | 20 50 74 72 3b 20 76 61 |r; buf :| Ptr; va|
|00002250| 72 20 73 69 7a 65 20 3a | 20 6c 6f 6e 67 69 6e 74 |r size :| longint|
|00002260| 29 20 3a 20 49 43 45 72 | 72 6f 72 3b 0d 20 20 20 |) : ICEr|ror;. |
|00002270| 20 28 2a 20 59 6f 75 20 | 6d 75 73 74 20 73 70 65 | (* You |must spe|
|00002280| 63 69 66 79 20 61 20 63 | 6f 6e 66 69 67 75 72 61 |cify a c|onfigura|
|00002290| 74 69 6f 6e 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |tion bef|ore call|
|000022a0| 69 6e 67 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |ing this| routine|
|000022b0| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 79 6f 75 20 |.. *| If you |
|000022c0| 61 72 65 20 67 65 74 74 | 69 6e 67 20 6f 72 20 73 |are gett|ing or s|
|000022d0| 65 74 74 69 6e 67 20 6d | 75 6c 74 69 70 6c 65 20 |etting m|ultiple |
|000022e0| 70 72 65 66 65 72 65 6e | 63 65 73 2c 20 79 6f 75 |preferen|ces, you|
|000022f0| 20 73 68 6f 75 6c 64 20 | 70 6c 61 63 65 0d 20 20 | should |place. |
|00002300| 20 20 20 2a 20 74 68 65 | 73 65 20 63 61 6c 6c 73 | * the|se calls|
|00002310| 20 77 69 74 68 69 6e 20 | 61 6e 20 49 43 42 65 67 | within |an ICBeg|
|00002320| 69 6e 2f 49 43 45 6e 64 | 20 70 61 69 72 2e 0d 20 |in/ICEnd| pair.. |
|00002330| 20 20 20 20 2a 20 49 66 | 20 79 6f 75 20 63 61 6c | * If| you cal|
|00002340| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 20 6f |l this r|outine o|
|00002350| 75 74 73 69 64 65 20 6f | 66 20 73 75 63 68 20 61 |utside o|f such a|
|00002360| 20 70 61 69 72 2c 20 69 | 74 20 69 6d 70 6c 69 63 | pair, i|t implic|
|00002370| 69 74 6c 79 0d 20 20 20 | 20 20 2a 20 63 61 6c 6c |itly. | * call|
|00002380| 73 20 49 43 42 65 67 69 | 6e 28 69 6e 73 74 2c 20 |s ICBegi|n(inst, |
|00002390| 69 63 52 65 61 64 4f 6e | 6c 79 50 65 72 6d 29 2e |icReadOn|lyPerm).|
|000023a0| 0d 20 20 20 20 20 2a 20 | 52 65 61 64 73 20 74 68 |. * |Reads th|
|000023b0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 20 73 70 65 |e prefer|ence spe|
|000023c0| 63 69 66 69 65 64 20 62 | 79 20 6b 65 79 20 66 72 |cified b|y key fr|
|000023d0| 6f 6d 20 74 68 65 20 49 | 43 20 64 61 74 61 62 61 |om the I|C databa|
|000023e0| 73 65 20 74 6f 20 74 68 | 65 0d 20 20 20 20 20 2a |se to th|e. *|
|000023f0| 20 62 75 66 66 65 72 20 | 70 6f 69 6e 74 65 64 20 | buffer |pointed |
|00002400| 74 6f 20 62 79 20 62 75 | 66 20 61 6e 64 20 73 69 |to by bu|f and si|
|00002410| 7a 65 2e 0d 20 20 20 20 | 20 2a 20 6b 65 79 20 6d |ze.. | * key m|
|00002420| 75 73 74 20 6e 6f 74 20 | 62 65 20 74 68 65 20 65 |ust not |be the e|
|00002430| 6d 70 74 79 20 73 74 72 | 69 6e 67 2e 0d 20 20 20 |mpty str|ing.. |
|00002440| 20 20 2a 20 49 66 20 62 | 75 66 20 69 73 20 6e 69 | * If b|uf is ni|
|00002450| 6c 20 74 68 65 6e 20 6e | 6f 20 64 61 74 61 20 69 |l then n|o data i|
|00002460| 73 20 72 65 74 75 72 6e | 65 64 2e 0d 20 20 20 20 |s return|ed.. |
|00002470| 20 2a 20 73 69 7a 65 20 | 6d 75 73 74 20 62 65 20 | * size |must be |
|00002480| 6e 6f 6e 2d 6e 65 67 61 | 74 69 76 65 2e 0d 20 20 |non-nega|tive.. |
|00002490| 20 20 20 2a 20 61 74 74 | 72 20 61 6e 64 20 73 69 | * att|r and si|
|000024a0| 7a 65 20 61 72 65 20 61 | 6c 77 61 79 73 20 73 65 |ze are a|lways se|
|000024b0| 74 20 6f 6e 20 72 65 74 | 75 72 6e 2e 20 4f 6e 20 |t on ret|urn. On |
|000024c0| 65 72 72 6f 72 73 20 28 | 65 78 63 65 70 74 20 69 |errors (|except i|
|000024d0| 63 54 72 75 6e 63 61 74 | 65 64 45 72 72 29 0d 20 |cTruncat|edErr). |
|000024e0| 20 20 20 20 2a 20 61 74 | 74 72 20 69 73 20 73 65 | * at|tr is se|
|000024f0| 74 20 74 6f 20 49 43 61 | 74 74 72 5f 6e 6f 5f 63 |t to ICa|ttr_no_c|
|00002500| 68 61 6e 67 65 20 61 6e | 64 20 73 69 7a 65 20 69 |hange an|d size i|
|00002510| 73 20 73 65 74 20 74 6f | 20 30 2e 0d 20 20 20 20 |s set to| 0.. |
|00002520| 20 2a 20 73 69 7a 65 20 | 69 73 20 74 68 65 20 61 | * size |is the a|
|00002530| 63 74 75 61 6c 20 73 69 | 7a 65 20 6f 66 20 74 68 |ctual si|ze of th|
|00002540| 65 20 64 61 74 61 2e 0d | 20 20 20 20 20 2a 20 61 |e data..| * a|
|00002550| 74 74 72 20 69 73 20 73 | 65 74 20 74 6f 20 74 68 |ttr is s|et to th|
|00002560| 65 20 61 74 74 72 69 62 | 75 74 65 73 20 61 73 73 |e attrib|utes ass|
|00002570| 6f 63 69 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |ociated |with the|
|00002580| 20 70 72 65 66 65 72 65 | 6e 63 65 2e 0d 20 20 20 | prefere|nce.. |
|00002590| 20 20 2a 20 49 66 20 74 | 68 69 73 20 72 6f 75 74 | * If t|his rout|
|000025a0| 69 6e 65 20 72 65 74 75 | 72 6e 73 20 69 63 54 72 |ine retu|rns icTr|
|000025b0| 75 6e 63 61 74 65 64 45 | 72 72 20 74 68 65 6e 20 |uncatedE|rr then |
|000025c0| 74 68 65 20 6f 74 68 65 | 72 20 72 65 74 75 72 6e |the othe|r return|
|000025d0| 65 64 0d 20 20 20 20 20 | 2a 20 76 61 6c 75 65 73 |ed. |* values|
|000025e0| 20 61 72 65 20 76 61 6c | 69 64 20 65 78 63 65 70 | are val|id excep|
|000025f0| 74 20 74 68 61 74 20 6f | 6e 6c 79 20 74 68 65 20 |t that o|nly the |
|00002600| 66 69 72 73 74 20 73 69 | 7a 65 20 62 79 74 65 73 |first si|ze bytes|
|00002610| 20 68 61 76 65 20 62 65 | 65 6e 0d 20 20 20 20 20 | have be|en. |
|00002620| 2a 20 72 65 74 75 72 6e | 2e 20 73 69 7a 65 20 69 |* return|. size i|
|00002630| 73 20 61 64 6a 75 73 74 | 65 64 20 74 6f 20 72 65 |s adjust|ed to re|
|00002640| 66 6c 65 63 74 20 74 68 | 65 20 74 72 75 65 20 73 |flect th|e true s|
|00002650| 69 7a 65 20 6f 66 20 74 | 68 65 20 70 72 65 66 65 |ize of t|he prefe|
|00002660| 72 65 6e 63 65 2e 0d 20 | 20 20 20 20 2a 20 52 65 |rence.. | * Re|
|00002670| 74 75 72 6e 73 20 69 63 | 50 72 65 66 4e 6f 74 46 |turns ic|PrefNotF|
|00002680| 6f 75 6e 64 20 69 66 20 | 74 68 65 72 65 20 69 73 |ound if |there is|
|00002690| 20 6e 6f 20 70 72 65 66 | 65 72 65 6e 63 65 20 66 | no pref|erence f|
|000026a0| 6f 72 20 74 68 65 20 6b | 65 79 2e 0d 20 20 20 20 |or the k|ey.. |
|000026b0| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|000026c0| 6e 20 49 43 53 65 74 50 | 72 65 66 28 69 6e 73 74 |n ICSetP|ref(inst|
|000026d0| 20 3a 20 49 43 49 6e 73 | 74 61 6e 63 65 3b 20 6b | : ICIns|tance; k|
|000026e0| 65 79 20 3a 20 53 74 72 | 32 35 35 3b 20 61 74 74 |ey : Str|255; att|
|000026f0| 72 20 3a 20 49 43 41 74 | 74 72 3b 20 62 75 66 20 |r : ICAt|tr; buf |
|00002700| 3a 20 50 74 72 3b 20 73 | 69 7a 65 20 3a 20 6c 6f |: Ptr; s|ize : lo|
|00002710| 6e 67 69 6e 74 29 20 3a | 20 49 43 45 72 72 6f 72 |ngint) :| ICError|
|00002720| 3b 0d 20 20 20 20 28 2a | 20 59 6f 75 20 6d 75 73 |;. (*| You mus|
|00002730| 74 20 73 70 65 63 69 66 | 79 20 61 20 63 6f 6e 66 |t specif|y a conf|
|00002740| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|00002750| 20 63 61 6c 6c 69 6e 67 | 20 74 68 69 73 20 72 6f | calling| this ro|
|00002760| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 49 66 |utine.. | * If|
|00002770| 20 79 6f 75 20 61 72 65 | 20 67 65 74 74 69 6e 67 | you are| getting|
|00002780| 20 6f 72 20 73 65 74 74 | 69 6e 67 20 6d 75 6c 74 | or sett|ing mult|
|00002790| 69 70 6c 65 20 70 72 65 | 66 65 72 65 6e 63 65 73 |iple pre|ferences|
|000027a0| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 70 6c 61 |, you sh|ould pla|
|000027b0| 63 65 0d 20 20 20 20 20 | 2a 20 74 68 65 73 65 20 |ce. |* these |
|000027c0| 63 61 6c 6c 73 20 77 69 | 74 68 69 6e 20 61 6e 20 |calls wi|thin an |
|000027d0| 49 43 42 65 67 69 6e 2f | 49 43 45 6e 64 20 70 61 |ICBegin/|ICEnd pa|
|000027e0| 69 72 2e 0d 20 20 20 20 | 20 2a 20 49 66 20 79 6f |ir.. | * If yo|
|000027f0| 75 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |u call t|his rout|
|00002800| 69 6e 65 20 6f 75 74 73 | 69 64 65 20 6f 66 20 73 |ine outs|ide of s|
|00002810| 75 63 68 20 61 20 70 61 | 69 72 2c 20 69 74 20 69 |uch a pa|ir, it i|
|00002820| 6d 70 6c 69 63 69 74 6c | 79 0d 20 20 20 20 20 2a |mplicitl|y. *|
|00002830| 20 63 61 6c 6c 73 20 49 | 43 42 65 67 69 6e 28 69 | calls I|CBegin(i|
|00002840| 6e 73 74 2c 20 69 63 52 | 65 61 64 57 72 69 74 65 |nst, icR|eadWrite|
|00002850| 50 65 72 6d 29 2e 0d 20 | 20 20 20 20 2a 20 53 65 |Perm).. | * Se|
|00002860| 74 73 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |ts the p|referenc|
|00002870| 65 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 6b |e specif|ied by k|
|00002880| 65 79 20 66 72 6f 6d 20 | 74 68 65 20 49 43 20 64 |ey from |the IC d|
|00002890| 61 74 61 62 61 73 65 20 | 74 6f 20 74 68 65 0d 20 |atabase |to the. |
|000028a0| 20 20 20 20 2a 20 76 61 | 6c 75 65 20 70 6f 69 6e | * va|lue poin|
|000028b0| 74 65 64 20 74 6f 20 62 | 79 20 62 75 66 20 61 6e |ted to b|y buf an|
|000028c0| 64 20 73 69 7a 65 2e 0d | 20 20 20 20 20 2a 20 6b |d size..| * k|
|000028d0| 65 79 20 6d 75 73 74 20 | 6e 6f 74 20 62 65 20 74 |ey must |not be t|
|000028e0| 68 65 20 65 6d 70 74 79 | 20 73 74 72 69 6e 67 2e |he empty| string.|
|000028f0| 0d 20 20 20 20 20 2a 20 | 73 69 7a 65 20 6d 75 73 |. * |size mus|
|00002900| 74 20 62 65 20 6e 6f 6e | 2d 6e 65 67 61 74 69 76 |t be non|-negativ|
|00002910| 65 2e 20 0d 20 20 20 20 | 20 2a 20 49 66 20 62 75 |e. . | * If bu|
|00002920| 66 20 69 73 20 6e 69 6c | 20 74 68 65 6e 20 74 68 |f is nil| then th|
|00002930| 65 20 70 72 65 66 65 72 | 65 6e 63 65 20 76 61 6c |e prefer|ence val|
|00002940| 75 65 20 69 73 20 6e 6f | 74 20 73 65 74 20 61 6e |ue is no|t set an|
|00002950| 64 20 73 69 7a 65 20 69 | 73 20 69 67 6e 6f 72 65 |d size i|s ignore|
|00002960| 64 2e 0d 20 20 20 20 20 | 2a 20 49 66 20 62 75 66 |d.. |* If buf|
|00002970| 20 69 73 20 6e 6f 74 20 | 6e 69 6c 20 74 68 65 6e | is not |nil then|
|00002980| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 20 | the pre|ference |
|00002990| 76 61 6c 75 65 20 69 73 | 20 73 65 74 20 74 6f 20 |value is| set to |
|000029a0| 74 68 65 20 73 69 7a 65 | 0d 20 20 20 20 20 2a 20 |the size|. * |
|000029b0| 62 79 74 65 73 20 70 6f | 69 6e 74 65 64 20 74 6f |bytes po|inted to|
|000029c0| 20 62 79 20 62 75 66 2e | 0d 20 20 20 20 20 2a 20 | by buf.|. * |
|000029d0| 49 66 20 61 74 74 72 20 | 69 73 20 49 43 61 74 74 |If attr |is ICatt|
|000029e0| 72 5f 6e 6f 5f 63 68 61 | 6e 67 65 20 74 68 65 6e |r_no_cha|nge then|
|000029f0| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 20 | the pre|ference |
|00002a00| 61 74 74 72 69 62 75 74 | 65 73 20 61 72 65 20 6e |attribut|es are n|
|00002a10| 6f 74 20 73 65 74 2e 0d | 20 20 20 20 20 2a 20 4f |ot set..| * O|
|00002a20| 74 68 65 72 77 69 73 65 | 20 74 68 65 20 70 72 65 |therwise| the pre|
|00002a30| 66 65 72 65 6e 63 65 20 | 61 74 74 72 69 62 75 74 |ference |attribut|
|00002a40| 65 73 20 61 72 65 20 73 | 65 74 20 74 6f 20 61 74 |es are s|et to at|
|00002a50| 74 72 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |tr.. | * Retur|
|00002a60| 6e 73 20 69 63 50 65 72 | 6d 45 72 72 20 69 66 20 |ns icPer|mErr if |
|00002a70| 74 68 65 20 70 72 65 76 | 69 6f 75 73 20 49 43 42 |the prev|ious ICB|
|00002a80| 65 67 69 6e 20 77 61 73 | 20 70 61 73 73 65 64 20 |egin was| passed |
|00002a90| 69 63 52 65 61 64 4f 6e | 6c 79 50 65 72 6d 2e 0d |icReadOn|lyPerm..|
|00002aa0| 20 20 20 20 20 2a 20 52 | 65 74 75 72 6e 73 20 69 | * R|eturns i|
|00002ab0| 63 50 65 72 6d 45 72 72 | 20 69 66 20 63 75 72 72 |cPermErr| if curr|
|00002ac0| 65 6e 74 20 61 74 74 72 | 20 69 73 20 6c 6f 63 6b |ent attr| is lock|
|00002ad0| 65 64 2c 20 6e 65 77 20 | 61 74 74 72 20 69 73 20 |ed, new |attr is |
|00002ae0| 6c 6f 63 6b 65 64 20 61 | 6e 64 20 62 75 66 20 3c |locked a|nd buf <|
|00002af0| 3e 20 6e 69 6c 2e 0d 20 | 20 20 20 20 2a 29 0d 20 |> nil.. | *). |
|00002b00| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 46 | . func|tion ICF|
|00002b10| 69 6e 64 50 72 65 66 48 | 61 6e 64 6c 65 28 69 6e |indPrefH|andle(in|
|00002b20| 73 74 20 3a 20 49 43 49 | 6e 73 74 61 6e 63 65 3b |st : ICI|nstance;|
|00002b30| 20 6b 65 79 20 3a 20 53 | 74 72 32 35 35 3b 20 76 | key : S|tr255; v|
|00002b40| 61 72 20 61 74 74 72 20 | 3a 20 49 43 41 74 74 72 |ar attr |: ICAttr|
|00002b50| 3b 20 70 72 65 66 68 20 | 3a 20 48 61 6e 64 6c 65 |; prefh |: Handle|
|00002b60| 29 20 3a 20 49 43 45 72 | 72 6f 72 3b 0d 20 20 20 |) : ICEr|ror;. |
|00002b70| 20 28 2a 20 52 65 71 75 | 69 72 65 73 20 49 43 20 | (* Requ|ires IC |
|00002b80| 31 2e 32 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |1.2.. | * You |
|00002b90| 6d 75 73 74 20 73 70 65 | 63 69 66 79 20 61 20 63 |must spe|cify a c|
|00002ba0| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00002bb0| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00002bc0| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00002bd0| 20 49 66 20 79 6f 75 20 | 61 72 65 20 67 65 74 74 | If you |are gett|
|00002be0| 69 6e 67 20 6f 72 20 73 | 65 74 74 69 6e 67 20 6d |ing or s|etting m|
|00002bf0| 75 6c 74 69 70 6c 65 20 | 70 72 65 66 65 72 65 6e |ultiple |preferen|
|00002c00| 63 65 73 2c 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ces, you| should |
|00002c10| 70 6c 61 63 65 0d 20 20 | 20 20 20 2a 20 74 68 65 |place. | * the|
|00002c20| 73 65 20 63 61 6c 6c 73 | 20 77 69 74 68 69 6e 20 |se calls| within |
|00002c30| 61 6e 20 49 43 42 65 67 | 69 6e 2f 49 43 45 6e 64 |an ICBeg|in/ICEnd|
|00002c40| 20 70 61 69 72 2e 0d 20 | 20 20 20 20 2a 20 49 66 | pair.. | * If|
|00002c50| 20 79 6f 75 20 63 61 6c | 6c 20 74 68 69 73 20 72 | you cal|l this r|
|00002c60| 6f 75 74 69 6e 65 20 6f | 75 74 73 69 64 65 20 6f |outine o|utside o|
|00002c70| 66 20 73 75 63 68 20 61 | 20 70 61 69 72 2c 20 69 |f such a| pair, i|
|00002c80| 74 20 69 6d 70 6c 69 63 | 69 74 6c 79 0d 20 20 20 |t implic|itly. |
|00002c90| 20 20 2a 20 63 61 6c 6c | 73 20 49 43 42 65 67 69 | * call|s ICBegi|
|00002ca0| 6e 28 69 6e 73 74 2c 20 | 69 63 52 65 61 64 57 72 |n(inst, |icReadWr|
|00002cb0| 69 74 65 50 65 72 6d 29 | 2e 0d 20 20 20 20 20 2a |itePerm)|.. *|
|00002cc0| 20 54 68 69 73 20 72 6f | 75 74 69 6e 65 20 65 66 | This ro|utine ef|
|00002cd0| 66 65 63 74 69 76 65 6c | 79 20 72 65 70 6c 61 63 |fectivel|y replac|
|00002ce0| 65 73 20 49 43 47 65 74 | 50 72 65 66 48 61 6e 64 |es ICGet|PrefHand|
|00002cf0| 6c 65 2e 0d 20 20 20 20 | 20 2a 20 52 65 61 64 73 |le.. | * Reads|
|00002d00| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 20 | the pre|ference |
|00002d10| 73 70 65 63 69 66 69 65 | 64 20 62 79 20 6b 65 79 |specifie|d by key|
|00002d20| 20 66 72 6f 6d 20 74 68 | 65 20 49 43 20 64 61 74 | from th|e IC dat|
|00002d30| 61 62 61 73 65 20 69 6e | 74 6f 0d 20 20 20 20 20 |abase in|to. |
|00002d40| 2a 20 61 20 68 61 6e 64 | 6c 65 2c 20 70 72 65 66 |* a hand|le, pref|
|00002d50| 68 2e 0d 20 20 20 20 20 | 2a 20 6b 65 79 20 6d 75 |h.. |* key mu|
|00002d60| 73 74 20 6e 6f 74 20 62 | 65 20 74 68 65 20 65 6d |st not b|e the em|
|00002d70| 70 74 79 20 73 74 72 69 | 6e 67 2e 0d 20 20 20 20 |pty stri|ng.. |
|00002d80| 20 2a 20 61 74 74 72 20 | 69 73 20 73 65 74 20 74 | * attr |is set t|
|00002d90| 6f 20 74 68 65 20 61 74 | 74 72 69 62 75 74 65 73 |o the at|tributes|
|00002da0| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00002db0| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 2e | the pre|ference.|
|00002dc0| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |. * |You must|
|00002dd0| 20 73 65 74 20 70 72 65 | 66 68 20 74 6f 20 61 20 | set pre|fh to a |
|00002de0| 6e 6f 6e 2d 6e 69 6c 20 | 68 61 6e 64 6c 65 20 62 |non-nil |handle b|
|00002df0| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00002e00| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|00002e10| 20 2a 20 49 66 20 74 68 | 65 20 70 72 65 66 65 72 | * If th|e prefer|
|00002e20| 65 6e 63 65 20 64 6f 65 | 73 20 6e 6f 74 20 65 78 |ence doe|s not ex|
|00002e30| 69 73 74 2c 20 69 63 50 | 72 65 66 4e 6f 74 46 6f |ist, icP|refNotFo|
|00002e40| 75 6e 64 45 72 72 20 69 | 73 20 72 65 74 75 72 6e |undErr i|s return|
|00002e50| 65 64 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |ed.. | *). . |
|00002e60| 20 66 75 6e 63 74 69 6f | 6e 20 49 43 47 65 74 50 | functio|n ICGetP|
|00002e70| 72 65 66 48 61 6e 64 6c | 65 28 69 6e 73 74 20 3a |refHandl|e(inst :|
|00002e80| 20 49 43 49 6e 73 74 61 | 6e 63 65 3b 20 6b 65 79 | ICInsta|nce; key|
|00002e90| 20 3a 20 53 74 72 32 35 | 35 3b 20 76 61 72 20 61 | : Str25|5; var a|
|00002ea0| 74 74 72 20 3a 20 49 43 | 41 74 74 72 3b 20 76 61 |ttr : IC|Attr; va|
|00002eb0| 72 20 70 72 65 66 68 20 | 3a 20 48 61 6e 64 6c 65 |r prefh |: Handle|
|00002ec0| 29 20 3a 20 49 43 45 72 | 72 6f 72 3b 0d 20 20 20 |) : ICEr|ror;. |
|00002ed0| 20 28 2a 20 52 65 71 75 | 69 72 65 73 20 49 43 20 | (* Requ|ires IC |
|00002ee0| 31 2e 31 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |1.1.. | * You |
|00002ef0| 6d 75 73 74 20 73 70 65 | 63 69 66 79 20 61 20 63 |must spe|cify a c|
|00002f00| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00002f10| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00002f20| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00002f30| 20 49 66 20 79 6f 75 20 | 61 72 65 20 67 65 74 74 | If you |are gett|
|00002f40| 69 6e 67 20 6f 72 20 73 | 65 74 74 69 6e 67 20 6d |ing or s|etting m|
|00002f50| 75 6c 74 69 70 6c 65 20 | 70 72 65 66 65 72 65 6e |ultiple |preferen|
|00002f60| 63 65 73 2c 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 |ces, you| should |
|00002f70| 70 6c 61 63 65 0d 20 20 | 20 20 20 2a 20 74 68 65 |place. | * the|
|00002f80| 73 65 20 63 61 6c 6c 73 | 20 77 69 74 68 69 6e 20 |se calls| within |
|00002f90| 61 6e 20 49 43 42 65 67 | 69 6e 2f 49 43 45 6e 64 |an ICBeg|in/ICEnd|
|00002fa0| 20 70 61 69 72 2e 0d 20 | 20 20 20 20 2a 20 49 66 | pair.. | * If|
|00002fb0| 20 79 6f 75 20 63 61 6c | 6c 20 74 68 69 73 20 72 | you cal|l this r|
|00002fc0| 6f 75 74 69 6e 65 20 6f | 75 74 73 69 64 65 20 6f |outine o|utside o|
|00002fd0| 66 20 73 75 63 68 20 61 | 20 70 61 69 72 2c 20 69 |f such a| pair, i|
|00002fe0| 74 20 69 6d 70 6c 69 63 | 69 74 6c 79 0d 20 20 20 |t implic|itly. |
|00002ff0| 20 20 2a 20 63 61 6c 6c | 73 20 49 43 42 65 67 69 | * call|s ICBegi|
|00003000| 6e 28 69 6e 73 74 2c 20 | 69 63 52 65 61 64 4f 6e |n(inst, |icReadOn|
|00003010| 6c 79 50 65 72 6d 29 2e | 0d 20 20 20 20 20 2a 20 |lyPerm).|. * |
|00003020| 54 68 69 73 20 72 6f 75 | 74 69 6e 65 20 69 73 20 |This rou|tine is |
|00003030| 6e 6f 77 20 6f 62 73 6f | 6c 65 74 65 2e 20 55 73 |now obso|lete. Us|
|00003040| 65 20 49 43 46 69 6e 64 | 50 72 65 66 48 61 6e 64 |e ICFind|PrefHand|
|00003050| 6c 65 20 69 6e 73 74 65 | 61 64 2e 0d 20 20 20 20 |le inste|ad.. |
|00003060| 20 2a 20 52 65 61 64 73 | 20 74 68 65 20 70 72 65 | * Reads| the pre|
|00003070| 66 65 72 65 6e 63 65 20 | 73 70 65 63 69 66 69 65 |ference |specifie|
|00003080| 64 20 62 79 20 6b 65 79 | 20 66 72 6f 6d 20 74 68 |d by key| from th|
|00003090| 65 20 49 43 20 64 61 74 | 61 62 61 73 65 20 69 6e |e IC dat|abase in|
|000030a0| 74 6f 0d 20 20 20 20 20 | 2a 20 61 20 6e 65 77 6c |to. |* a newl|
|000030b0| 79 20 63 72 65 61 74 65 | 64 20 68 61 6e 64 6c 65 |y create|d handle|
|000030c0| 2c 20 70 72 65 66 68 2e | 0d 20 20 20 20 20 2a 20 |, prefh.|. * |
|000030d0| 6b 65 79 20 6d 75 73 74 | 20 6e 6f 74 20 62 65 20 |key must| not be |
|000030e0| 74 68 65 20 65 6d 70 74 | 79 20 73 74 72 69 6e 67 |the empt|y string|
|000030f0| 2e 0d 20 20 20 20 20 2a | 20 61 74 74 72 20 69 73 |.. *| attr is|
|00003100| 20 73 65 74 20 74 6f 20 | 74 68 65 20 61 74 74 72 | set to |the attr|
|00003110| 69 62 75 74 65 73 20 61 | 73 73 6f 63 69 61 74 65 |ibutes a|ssociate|
|00003120| 64 20 77 69 74 68 20 74 | 68 65 20 70 72 65 66 65 |d with t|he prefe|
|00003130| 72 65 6e 63 65 2e 0d 20 | 20 20 20 20 2a 20 54 68 |rence.. | * Th|
|00003140| 65 20 69 6e 63 6f 6d 69 | 6e 67 20 76 61 6c 75 65 |e incomi|ng value|
|00003150| 20 6f 66 20 70 72 65 66 | 68 20 69 73 20 69 67 6e | of pref|h is ign|
|00003160| 6f 72 65 64 2e 0d 20 20 | 20 20 20 2a 20 41 20 6e |ored.. | * A n|
|00003170| 65 77 20 68 61 6e 64 6c | 65 20 69 73 20 63 72 65 |ew handl|e is cre|
|00003180| 61 74 65 64 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ated in |the curr|
|00003190| 65 6e 74 20 68 65 61 70 | 20 61 6e 64 20 72 65 74 |ent heap| and ret|
|000031a0| 75 72 6e 65 64 20 69 6e | 20 70 72 65 66 68 2e 0d |urned in| prefh..|
|000031b0| 20 20 20 20 20 2a 20 49 | 66 20 74 68 65 20 72 6f | * I|f the ro|
|000031c0| 75 74 69 6e 65 20 72 65 | 74 75 72 6e 73 20 61 6e |utine re|turns an|
|000031d0| 20 65 72 72 6f 72 2c 20 | 70 72 65 66 68 20 69 73 | error, |prefh is|
|000031e0| 20 73 65 74 20 74 6f 20 | 6e 69 6c 2e 0d 20 20 20 | set to |nil.. |
|000031f0| 20 20 2a 20 49 66 20 74 | 68 65 20 70 72 65 66 65 | * If t|he prefe|
|00003200| 72 65 6e 63 65 20 64 6f | 65 73 20 6e 6f 74 20 65 |rence do|es not e|
|00003210| 78 69 73 74 2c 20 6e 6f | 20 65 72 72 6f 72 20 69 |xist, no| error i|
|00003220| 73 20 72 65 74 75 72 6e | 65 64 20 61 6e 64 20 70 |s return|ed and p|
|00003230| 72 65 66 68 20 69 73 20 | 73 65 74 0d 20 20 20 20 |refh is |set. |
|00003240| 20 2a 20 74 6f 20 61 6e | 20 65 6d 70 74 79 20 68 | * to an| empty h|
|00003250| 61 6e 64 6c 65 2e 0d 20 | 20 20 20 20 2a 29 0d 20 |andle.. | *). |
|00003260| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 53 | . func|tion ICS|
|00003270| 65 74 50 72 65 66 48 61 | 6e 64 6c 65 28 69 6e 73 |etPrefHa|ndle(ins|
|00003280| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|00003290| 6b 65 79 20 3a 20 53 74 | 72 32 35 35 3b 20 61 74 |key : St|r255; at|
|000032a0| 74 72 20 3a 20 49 43 41 | 74 74 72 3b 20 70 72 65 |tr : ICA|ttr; pre|
|000032b0| 66 68 20 3a 20 48 61 6e | 64 6c 65 29 20 3a 20 49 |fh : Han|dle) : I|
|000032c0| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 52 |CError;.| (* R|
|000032d0| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|000032e0| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|000032f0| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00003300| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00003310| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00003320| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 79 |ine.. | * If y|
|00003330| 6f 75 20 61 72 65 20 67 | 65 74 74 69 6e 67 20 6f |ou are g|etting o|
|00003340| 72 20 73 65 74 74 69 6e | 67 20 6d 75 6c 74 69 70 |r settin|g multip|
|00003350| 6c 65 20 70 72 65 66 65 | 72 65 6e 63 65 73 2c 20 |le prefe|rences, |
|00003360| 79 6f 75 20 73 68 6f 75 | 6c 64 20 70 6c 61 63 65 |you shou|ld place|
|00003370| 0d 20 20 20 20 20 2a 20 | 74 68 65 73 65 20 63 61 |. * |these ca|
|00003380| 6c 6c 73 20 77 69 74 68 | 69 6e 20 61 6e 20 49 43 |lls with|in an IC|
|00003390| 42 65 67 69 6e 2f 49 43 | 45 6e 64 20 70 61 69 72 |Begin/IC|End pair|
|000033a0| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 79 6f 75 20 |.. *| If you |
|000033b0| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|000033c0| 65 20 6f 75 74 73 69 64 | 65 20 6f 66 20 73 75 63 |e outsid|e of suc|
|000033d0| 68 20 61 20 70 61 69 72 | 2c 20 69 74 20 69 6d 70 |h a pair|, it imp|
|000033e0| 6c 69 63 69 74 6c 79 0d | 20 20 20 20 20 2a 20 63 |licitly.| * c|
|000033f0| 61 6c 6c 73 20 49 43 42 | 65 67 69 6e 28 69 6e 73 |alls ICB|egin(ins|
|00003400| 74 2c 20 69 63 52 65 61 | 64 57 72 69 74 65 50 65 |t, icRea|dWritePe|
|00003410| 72 6d 29 2e 0d 20 20 20 | 20 20 2a 20 53 65 74 73 |rm).. | * Sets|
|00003420| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 20 | the pre|ference |
|00003430| 73 70 65 63 69 66 69 65 | 64 20 62 79 20 6b 65 79 |specifie|d by key|
|00003440| 20 66 72 6f 6d 20 74 68 | 65 20 49 43 20 64 61 74 | from th|e IC dat|
|00003450| 61 62 61 73 65 20 74 6f | 20 74 68 65 0d 20 20 20 |abase to| the. |
|00003460| 20 20 2a 20 76 61 6c 75 | 65 20 63 6f 6e 74 61 69 | * valu|e contai|
|00003470| 6e 65 64 20 69 6e 20 70 | 72 65 66 68 2e 0d 20 20 |ned in p|refh.. |
|00003480| 20 20 20 2a 20 6b 65 79 | 20 6d 75 73 74 20 6e 6f | * key| must no|
|00003490| 74 20 62 65 20 74 68 65 | 20 65 6d 70 74 79 20 73 |t be the| empty s|
|000034a0| 74 72 69 6e 67 2e 0d 20 | 20 20 20 20 2a 20 49 66 |tring.. | * If|
|000034b0| 20 70 72 65 66 68 20 69 | 73 20 6e 69 6c 20 74 68 | prefh i|s nil th|
|000034c0| 65 6e 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |en the p|referenc|
|000034d0| 65 20 76 61 6c 75 65 20 | 69 73 20 6e 6f 74 20 73 |e value |is not s|
|000034e0| 65 74 2e 0d 20 20 20 20 | 20 2a 20 49 66 20 62 75 |et.. | * If bu|
|000034f0| 66 20 69 73 20 6e 6f 74 | 20 6e 69 6c 20 74 68 65 |f is not| nil the|
|00003500| 6e 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |n the pr|eference|
|00003510| 20 76 61 6c 75 65 20 69 | 73 20 73 65 74 20 74 6f | value i|s set to|
|00003520| 20 74 68 65 20 64 61 74 | 61 0d 20 20 20 20 20 2a | the dat|a. *|
|00003530| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 6e 20 69 74 | contain|ed in it|
|00003540| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 61 74 74 72 |.. *| If attr|
|00003550| 20 69 73 20 49 43 61 74 | 74 72 5f 6e 6f 5f 63 68 | is ICat|tr_no_ch|
|00003560| 61 6e 67 65 20 74 68 65 | 6e 20 74 68 65 20 70 72 |ange the|n the pr|
|00003570| 65 66 65 72 65 6e 63 65 | 20 61 74 74 72 69 62 75 |eference| attribu|
|00003580| 74 65 73 20 61 72 65 20 | 6e 6f 74 20 73 65 74 2e |tes are |not set.|
|00003590| 0d 20 20 20 20 20 2a 20 | 4f 74 68 65 72 77 69 73 |. * |Otherwis|
|000035a0| 65 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |e the pr|eference|
|000035b0| 20 61 74 74 72 69 62 75 | 74 65 73 20 61 72 65 20 | attribu|tes are |
|000035c0| 73 65 74 20 74 6f 20 61 | 74 74 72 2e 0d 20 20 20 |set to a|ttr.. |
|000035d0| 20 20 2a 20 52 65 74 75 | 72 6e 73 20 69 63 50 65 | * Retu|rns icPe|
|000035e0| 72 6d 45 72 72 20 69 66 | 20 74 68 65 20 70 72 65 |rmErr if| the pre|
|000035f0| 76 69 6f 75 73 20 49 43 | 42 65 67 69 6e 20 77 61 |vious IC|Begin wa|
|00003600| 73 20 70 61 73 73 65 64 | 20 69 63 52 65 61 64 4f |s passed| icReadO|
|00003610| 6e 6c 79 50 65 72 6d 2e | 0d 20 20 20 20 20 2a 20 |nlyPerm.|. * |
|00003620| 52 65 74 75 72 6e 73 20 | 69 63 50 65 72 6d 45 72 |Returns |icPermEr|
|00003630| 72 20 69 66 20 63 75 72 | 72 65 6e 74 20 61 74 74 |r if cur|rent att|
|00003640| 72 20 69 73 20 6c 6f 63 | 6b 65 64 2c 20 6e 65 77 |r is loc|ked, new|
|00003650| 20 61 74 74 72 20 69 73 | 20 6c 6f 63 6b 65 64 20 | attr is| locked |
|00003660| 61 6e 64 20 70 72 65 66 | 68 20 3c 3e 20 6e 69 6c |and pref|h <> nil|
|00003670| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 66 |.. *|). . f|
|00003680| 75 6e 63 74 69 6f 6e 20 | 49 43 43 6f 75 6e 74 50 |unction |ICCountP|
|00003690| 72 65 66 28 69 6e 73 74 | 20 3a 20 49 43 49 6e 73 |ref(inst| : ICIns|
|000036a0| 74 61 6e 63 65 3b 20 76 | 61 72 20 63 6f 75 6e 74 |tance; v|ar count|
|000036b0| 20 3a 20 6c 6f 6e 67 69 | 6e 74 29 20 3a 20 49 43 | : longi|nt) : IC|
|000036c0| 45 72 72 6f 72 3b 0d 20 | 20 20 20 28 2a 20 59 6f |Error;. | (* Yo|
|000036d0| 75 20 6d 75 73 74 20 73 | 70 65 63 69 66 79 20 61 |u must s|pecify a|
|000036e0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|000036f0| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00003700| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|00003710| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 62 65 20 69 | * You m|ust be i|
|00003720| 6e 73 69 64 65 20 61 6e | 20 49 43 42 65 67 69 6e |nside an| ICBegin|
|00003730| 2f 45 6e 64 20 70 61 69 | 72 20 74 6f 20 63 61 6c |/End pai|r to cal|
|00003740| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |l this r|outine..|
|00003750| 20 20 20 20 20 2a 20 43 | 6f 75 6e 74 73 20 74 68 | * C|ounts th|
|00003760| 65 20 74 6f 74 61 6c 20 | 6e 75 6d 62 65 72 20 6f |e total |number o|
|00003770| 66 20 70 72 65 66 65 72 | 65 6e 63 65 73 2e 0d 20 |f prefer|ences.. |
|00003780| 20 20 20 20 2a 20 49 66 | 20 74 68 65 20 72 6f 75 | * If| the rou|
|00003790| 74 69 6e 65 20 72 65 74 | 75 72 6e 73 20 61 6e 20 |tine ret|urns an |
|000037a0| 65 72 72 6f 72 2c 20 63 | 6f 75 6e 74 20 69 73 20 |error, c|ount is |
|000037b0| 73 65 74 20 74 6f 20 30 | 2e 0d 20 20 20 20 20 2a |set to 0|.. *|
|000037c0| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|000037d0| 49 43 47 65 74 49 6e 64 | 50 72 65 66 28 69 6e 73 |ICGetInd|Pref(ins|
|000037e0| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|000037f0| 6e 20 3a 20 6c 6f 6e 67 | 69 6e 74 3b 20 76 61 72 |n : long|int; var|
|00003800| 20 6b 65 79 20 3a 20 53 | 74 72 32 35 35 29 20 3a | key : S|tr255) :|
|00003810| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 20 20 28 2a | ICError|;. (*|
|00003820| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00003830| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00003840| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00003850| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00003860| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 62 | * Yo|u must b|
|00003870| 65 20 69 6e 73 69 64 65 | 20 61 6e 20 49 43 42 65 |e inside| an ICBe|
|00003880| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 20 74 6f 20 |gin/End |pair to |
|00003890| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|000038a0| 65 2e 0d 20 20 20 20 20 | 2a 20 52 65 74 75 72 6e |e.. |* Return|
|000038b0| 73 20 74 68 65 20 6b 65 | 79 20 6f 66 20 74 68 65 |s the ke|y of the|
|000038c0| 20 4e 74 68 20 70 72 65 | 66 65 72 65 6e 63 65 2e | Nth pre|ference.|
|000038d0| 0d 20 20 20 20 20 2a 20 | 6e 20 6d 75 73 74 20 62 |. * |n must b|
|000038e0| 65 20 70 6f 73 69 74 69 | 76 65 2e 0d 20 20 20 20 |e positi|ve.. |
|000038f0| 20 2a 20 52 65 74 75 72 | 6e 73 20 69 63 50 72 65 | * Retur|ns icPre|
|00003900| 66 4e 6f 74 46 6f 75 6e | 64 45 72 72 20 69 66 20 |fNotFoun|dErr if |
|00003910| 6e 20 69 73 20 67 72 65 | 61 74 65 72 20 74 68 61 |n is gre|ater tha|
|00003920| 6e 20 74 68 65 20 74 6f | 74 61 6c 20 6e 75 6d 62 |n the to|tal numb|
|00003930| 65 72 20 6f 66 20 70 72 | 65 66 65 72 65 6e 63 65 |er of pr|eference|
|00003940| 73 2e 0d 20 20 20 20 20 | 2a 20 49 66 20 74 68 65 |s.. |* If the|
|00003950| 20 72 6f 75 74 69 6e 65 | 20 72 65 74 75 72 6e 73 | routine| returns|
|00003960| 20 61 6e 20 65 72 72 6f | 72 2c 20 6b 65 79 20 69 | an erro|r, key i|
|00003970| 73 20 75 6e 64 65 66 69 | 6e 65 64 2e 0d 20 20 20 |s undefi|ned.. |
|00003980| 20 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 | *). .| functi|
|00003990| 6f 6e 20 49 43 44 65 6c | 65 74 65 50 72 65 66 28 |on ICDel|etePref(|
|000039a0| 69 6e 73 74 20 3a 20 49 | 43 49 6e 73 74 61 6e 63 |inst : I|CInstanc|
|000039b0| 65 3b 20 6b 65 79 20 3a | 20 53 74 72 32 35 35 29 |e; key :| Str255)|
|000039c0| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 20 20 | : ICErr|or;. |
|000039d0| 28 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 |(* You m|ust spec|
|000039e0| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|000039f0| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00003a00| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00003a10| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |. * |You must|
|00003a20| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|00003a30| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|00003a40| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00003a50| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 44 65 6c 65 |ine.. | * Dele|
|00003a60| 74 65 73 20 74 68 65 20 | 70 72 65 66 65 72 65 6e |tes the |preferen|
|00003a70| 63 65 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |ce speci|fied by |
|00003a80| 6b 65 79 2e 0d 20 20 20 | 20 20 2a 20 6b 65 79 20 |key.. | * key |
|00003a90| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 74 68 65 20 |must not| be the |
|00003aa0| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 2e 0d 20 20 |empty st|ring.. |
|00003ab0| 20 20 20 2a 20 52 65 74 | 75 72 6e 73 20 69 63 50 | * Ret|urns icP|
|00003ac0| 72 65 66 4e 6f 74 46 6f | 75 6e 64 20 69 66 20 74 |refNotFo|und if t|
|00003ad0| 68 65 20 70 72 65 66 65 | 72 65 6e 63 65 20 73 70 |he prefe|rence sp|
|00003ae0| 65 63 69 66 69 65 64 20 | 62 79 20 6b 65 79 20 69 |ecified |by key i|
|00003af0| 73 20 6e 6f 74 20 70 72 | 65 73 65 6e 74 2e 0d 20 |s not pr|esent.. |
|00003b00| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00003b10| 74 69 6f 6e 20 49 43 45 | 6e 64 28 69 6e 73 74 20 |tion ICE|nd(inst |
|00003b20| 3a 20 49 43 49 6e 73 74 | 61 6e 63 65 29 20 3a 20 |: ICInst|ance) : |
|00003b30| 49 43 45 72 72 6f 72 3b | 0d 20 20 20 20 28 2a 20 |ICError;|. (* |
|00003b40| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|00003b50| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00003b60| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00003b70| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00003b80| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 62 65 | * You| must be|
|00003b90| 20 69 6e 73 69 64 65 20 | 61 6e 20 49 43 42 65 67 | inside |an ICBeg|
|00003ba0| 69 6e 2f 45 6e 64 20 70 | 61 69 72 20 74 6f 20 63 |in/End p|air to c|
|00003bb0| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00003bc0| 2e 0d 20 20 20 20 20 2a | 20 54 65 72 6d 69 6e 61 |.. *| Termina|
|00003bd0| 74 65 73 20 61 20 70 72 | 65 66 65 72 65 6e 63 65 |tes a pr|eference|
|00003be0| 20 73 65 73 73 69 6f 6e | 2c 20 61 73 20 73 74 61 | session|, as sta|
|00003bf0| 72 74 65 64 20 62 79 20 | 49 43 42 65 67 69 6e 2e |rted by |ICBegin.|
|00003c00| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |. * |You must|
|00003c10| 20 68 61 76 65 20 63 61 | 6c 6c 65 64 20 49 43 42 | have ca|lled ICB|
|00003c20| 65 67 69 6e 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |egin bef|ore call|
|00003c30| 69 6e 67 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |ing this| routine|
|00003c40| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 28 |.. *|). . (|
|00003c50| 2a 20 2a 2a 2a 2a 2a 20 | 55 73 65 72 20 49 6e 74 |* ***** |User Int|
|00003c60| 65 72 66 61 63 65 20 53 | 74 75 66 66 20 2a 2a 2a |erface S|tuff ***|
|00003c70| 2a 2a 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 |** *). |. funct|
|00003c80| 69 6f 6e 20 49 43 45 64 | 69 74 50 72 65 66 65 72 |ion ICEd|itPrefer|
|00003c90| 65 6e 63 65 73 28 69 6e | 73 74 20 3a 20 49 43 49 |ences(in|st : ICI|
|00003ca0| 6e 73 74 61 6e 63 65 3b | 20 6b 65 79 20 3a 20 53 |nstance;| key : S|
|00003cb0| 74 72 32 35 35 29 20 3a | 20 49 43 45 72 72 6f 72 |tr255) :| ICError|
|00003cc0| 3b 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |;. (*| Require|
|00003cd0| 73 20 49 43 20 31 2e 31 | 2e 0d 20 20 20 20 20 2a |s IC 1.1|.. *|
|00003ce0| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00003cf0| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00003d00| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00003d10| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00003d20| 20 20 20 20 2a 20 59 6f | 75 20 64 6f 20 6e 6f 74 | * Yo|u do not|
|00003d30| 20 68 61 76 65 20 74 6f | 20 62 65 20 69 6e 73 69 | have to| be insi|
|00003d40| 64 65 20 61 6e 20 49 43 | 42 65 67 69 6e 2f 45 6e |de an IC|Begin/En|
|00003d50| 64 20 70 61 69 72 20 74 | 6f 20 63 61 6c 6c 20 74 |d pair t|o call t|
|00003d60| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00003d70| 20 20 2a 20 49 6e 73 74 | 72 75 63 74 73 20 49 43 | * Inst|ructs IC|
|00003d80| 20 74 6f 20 64 69 73 70 | 6c 61 79 20 74 68 65 20 | to disp|lay the |
|00003d90| 75 73 65 72 20 69 6e 74 | 65 72 66 61 63 65 20 61 |user int|erface a|
|00003da0| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 65 |ssociate|d with e|
|00003db0| 64 69 74 69 6e 67 0d 20 | 20 20 20 20 2a 20 70 72 |diting. | * pr|
|00003dc0| 65 66 65 72 65 6e 63 65 | 73 20 61 6e 64 20 66 6f |eference|s and fo|
|00003dd0| 63 75 73 69 6e 67 20 6f | 6e 20 74 68 65 20 70 72 |cusing o|n the pr|
|00003de0| 65 66 65 72 65 6e 63 65 | 20 73 70 65 63 69 66 69 |eference| specifi|
|00003df0| 65 64 20 62 79 20 6b 65 | 79 2e 0d 20 20 20 20 20 |ed by ke|y.. |
|00003e00| 2a 20 49 66 20 6b 65 79 | 20 69 73 20 74 68 65 20 |* If key| is the |
|00003e10| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 20 74 68 65 |empty st|ring the|
|00003e20| 6e 20 6e 6f 20 70 72 65 | 66 65 72 65 6e 63 65 20 |n no pre|ference |
|00003e30| 73 68 6f 75 6c 64 20 62 | 65 20 66 6f 63 75 73 65 |should b|e focuse|
|00003e40| 64 20 75 70 6f 6e 2e 0d | 20 20 20 20 20 2a 20 59 |d upon..| * Y|
|00003e50| 6f 75 20 6d 75 73 74 20 | 68 61 76 65 20 73 70 65 |ou must |have spe|
|00003e60| 63 69 66 69 65 64 20 61 | 20 63 6f 6e 66 69 67 75 |cified a| configu|
|00003e70| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00003e80| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00003e90| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 64 |ne.. | * You d|
|00003ea0| 6f 20 6e 6f 74 20 6e 65 | 65 64 20 74 6f 20 63 61 |o not ne|ed to ca|
|00003eb0| 6c 6c 20 49 43 42 65 67 | 69 6e 20 62 65 66 6f 72 |ll ICBeg|in befor|
|00003ec0| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00003ed0| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 49 |outine..| * I|
|00003ee0| 6e 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 69 6d |n the cu|rrent im|
|00003ef0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 20 74 68 69 |plementa|tion thi|
|00003f00| 73 20 6c 61 75 6e 63 68 | 65 73 20 74 68 65 20 49 |s launch|es the I|
|00003f10| 43 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 0d 20 20 |C applic|ation. |
|00003f20| 20 20 20 2a 20 28 6f 72 | 20 62 72 69 6e 67 73 20 | * (or| brings |
|00003f30| 69 74 20 74 6f 20 74 68 | 65 20 66 72 6f 6e 74 29 |it to th|e front)|
|00003f40| 20 61 6e 64 20 64 69 73 | 70 6c 61 79 73 20 74 68 | and dis|plays th|
|00003f50| 65 20 77 69 6e 64 6f 77 | 20 63 6f 6e 74 61 69 6e |e window| contain|
|00003f60| 69 6e 67 0d 20 20 20 20 | 20 2a 20 74 68 65 20 70 |ing. | * the p|
|00003f70| 72 65 66 65 72 65 6e 63 | 65 20 73 70 65 63 69 66 |referenc|e specif|
|00003f80| 69 65 64 20 62 79 20 6b | 65 79 2e 0d 20 20 20 20 |ied by k|ey.. |
|00003f90| 20 2a 20 49 74 20 6d 61 | 79 20 68 61 76 65 20 61 | * It ma|y have a|
|00003fa0| 20 72 61 64 69 63 61 6c | 6c 79 20 64 69 66 66 65 | radical|ly diffe|
|00003fb0| 72 65 6e 74 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |rent imp|lementat|
|00003fc0| 69 6f 6e 20 69 6e 20 66 | 75 74 75 72 65 0d 20 20 |ion in f|uture. |
|00003fd0| 20 20 20 2a 20 49 43 20 | 73 79 73 74 65 6d 73 2e | * IC |systems.|
|00003fe0| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 28 2a |. *)|. . (*|
|00003ff0| 20 2a 2a 2a 2a 2a 20 55 | 52 4c 20 48 61 6e 64 6c | ***** U|RL Handl|
|00004000| 69 6e 67 20 2a 2a 2a 2a | 2a 20 2a 29 0d 20 20 0d |ing ****|* *). .|
|00004010| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 50 61 72 | functi|on ICPar|
|00004020| 73 65 55 52 4c 28 69 6e | 73 74 20 3a 20 49 43 49 |seURL(in|st : ICI|
|00004030| 6e 73 74 61 6e 63 65 3b | 20 68 69 6e 74 20 3a 20 |nstance;| hint : |
|00004040| 53 74 72 32 35 35 3b 20 | 64 61 74 61 20 3a 20 50 |Str255; |data : P|
|00004050| 74 72 3b 20 6c 65 6e 20 | 3a 20 6c 6f 6e 67 69 6e |tr; len |: longin|
|00004060| 74 3b 20 76 61 72 20 73 | 65 6c 53 74 61 72 74 20 |t; var s|elStart |
|00004070| 3a 20 6c 6f 6e 67 69 6e | 74 3b 20 76 61 72 20 73 |: longin|t; var s|
|00004080| 65 6c 45 6e 64 20 3a 20 | 6c 6f 6e 67 69 6e 74 3b |elEnd : |longint;|
|00004090| 20 75 72 6c 20 3a 20 48 | 61 6e 64 6c 65 29 20 3a | url : H|andle) :|
|000040a0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 20 20 28 2a | ICError|;. (*|
|000040b0| 20 52 65 71 75 69 72 65 | 73 20 49 43 20 31 2e 31 | Require|s IC 1.1|
|000040c0| 2e 0d 20 20 20 20 20 2a | 20 59 6f 75 20 6d 75 73 |.. *| You mus|
|000040d0| 74 20 73 70 65 63 69 66 | 79 20 61 20 63 6f 6e 66 |t specif|y a conf|
|000040e0| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|000040f0| 20 63 61 6c 6c 69 6e 67 | 20 74 68 69 73 20 72 6f | calling| this ro|
|00004100| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 59 6f |utine.. | * Yo|
|00004110| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 6f |u do not| have to|
|00004120| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|00004130| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|00004140| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00004150| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 50 61 72 73 |ine.. | * Pars|
|00004160| 65 73 20 61 20 55 52 4c | 20 6f 75 74 20 6f 66 20 |es a URL| out of |
|00004170| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 74 65 |the spec|ified te|
|00004180| 78 74 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 69 |xt and r|eturns i|
|00004190| 74 20 69 6e 20 61 20 63 | 61 6e 6f 6e 69 63 61 6c |t in a c|anonical|
|000041a0| 20 66 6f 72 6d 0d 20 20 | 20 20 20 2a 20 69 6e 20 | form. | * in |
|000041b0| 61 20 68 61 6e 64 6c 65 | 2e 0d 20 20 20 20 20 2a |a handle|.. *|
|000041c0| 20 68 69 6e 74 20 69 6e | 64 69 63 61 74 65 73 20 | hint in|dicates |
|000041d0| 74 68 65 20 64 65 66 61 | 75 6c 74 20 73 63 68 65 |the defa|ult sche|
|000041e0| 6d 65 20 66 6f 72 20 55 | 52 4c 73 20 6f 66 20 74 |me for U|RLs of t|
|000041f0| 68 65 20 66 6f 72 6d 20 | 22 6e 61 6d 65 40 61 64 |he form |"name@ad|
|00004200| 64 72 65 73 73 22 2e 0d | 20 20 20 20 20 2a 20 49 |dress"..| * I|
|00004210| 66 20 68 69 6e 74 20 69 | 73 20 74 68 65 20 65 6d |f hint i|s the em|
|00004220| 70 74 79 20 73 74 72 69 | 6e 67 20 74 68 65 6e 20 |pty stri|ng then |
|00004230| 55 52 4c 73 20 6f 66 20 | 74 68 61 74 20 66 6f 72 |URLs of |that for|
|00004240| 6d 20 61 72 65 20 6e 6f | 74 20 61 6c 6c 6f 77 65 |m are no|t allowe|
|00004250| 64 2e 0d 20 20 20 20 20 | 2a 20 64 61 74 61 20 70 |d.. |* data p|
|00004260| 6f 69 6e 74 73 20 74 6f | 20 74 68 65 20 73 74 61 |oints to| the sta|
|00004270| 72 74 20 6f 66 20 74 68 | 65 20 74 65 78 74 2e 20 |rt of th|e text. |
|00004280| 49 74 20 6d 75 73 74 20 | 6e 6f 74 20 62 65 20 6e |It must |not be n|
|00004290| 69 6c 2e 0d 20 20 20 20 | 20 2a 20 6c 65 6e 20 69 |il.. | * len i|
|000042a0| 6e 64 69 63 61 74 65 73 | 20 74 68 65 20 6c 65 6e |ndicates| the len|
|000042b0| 67 74 68 20 6f 66 20 74 | 68 65 20 74 65 78 74 2e |gth of t|he text.|
|000042c0| 20 49 74 20 6d 75 73 74 | 20 62 65 20 6e 6f 6e 2d | It must| be non-|
|000042d0| 6e 65 67 61 74 69 76 65 | 2e 0d 20 20 20 20 20 2a |negative|.. *|
|000042e0| 20 73 65 6c 53 74 61 72 | 74 20 61 6e 64 20 73 65 | selStar|t and se|
|000042f0| 6c 45 6e 64 20 73 68 6f | 75 6c 64 20 62 65 20 70 |lEnd sho|uld be p|
|00004300| 61 73 73 65 64 20 69 6e | 20 61 73 20 74 68 65 20 |assed in| as the |
|00004310| 63 75 72 72 65 6e 74 20 | 73 65 6c 65 63 74 69 6f |current |selectio|
|00004320| 6e 20 6f 66 0d 20 20 20 | 20 20 2a 20 74 68 65 20 |n of. | * the |
|00004330| 74 65 78 74 2e 20 54 68 | 69 73 20 73 65 6c 65 63 |text. Th|is selec|
|00004340| 74 69 6f 6e 20 69 73 20 | 67 69 76 65 6e 20 69 6e |tion is |given in|
|00004350| 20 74 68 65 20 73 61 6d | 65 20 6d 61 6e 6e 65 72 | the sam|e manner|
|00004360| 20 61 73 20 54 65 78 74 | 45 64 69 74 2c 0d 20 20 | as Text|Edit,. |
|00004370| 20 20 20 2a 20 69 65 20 | 69 66 20 73 65 6c 53 74 | * ie |if selSt|
|00004380| 61 72 74 20 3d 20 73 65 | 6c 45 6e 64 20 74 68 65 |art = se|lEnd the|
|00004390| 6e 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 73 65 |n there |is no se|
|000043a0| 6c 65 63 74 69 6f 6e 20 | 6f 6e 6c 79 20 61 6e 20 |lection |only an |
|000043b0| 69 6e 73 65 72 74 69 6f | 6e 0d 20 20 20 20 20 2a |insertio|n. *|
|000043c0| 20 70 6f 69 6e 74 2e 20 | 41 6c 73 6f 20 73 65 6c | point. |Also sel|
|000043d0| 53 74 61 72 74 20 b2 20 | 73 65 6c 45 6e 64 20 61 |Start . |selEnd a|
|000043e0| 6e 64 20 30 20 b2 20 73 | 65 6c 53 74 61 72 74 20 |nd 0 . s|elStart |
|000043f0| b2 20 6c 65 6e 20 61 6e | 64 20 30 20 b2 20 73 65 |. len an|d 0 . se|
|00004400| 6c 45 6e 64 20 b2 20 6c | 65 6e 2e 0d 20 20 20 20 |lEnd . l|en.. |
|00004410| 20 2a 20 73 65 6c 53 74 | 61 72 74 20 61 6e 64 20 | * selSt|art and |
|00004420| 73 65 6c 45 6e 64 20 61 | 72 65 20 72 65 74 75 72 |selEnd a|re retur|
|00004430| 6e 65 64 20 61 73 20 74 | 68 65 20 62 6f 75 6e 64 |ned as t|he bound|
|00004440| 73 20 6f 66 20 74 68 65 | 20 55 52 4c 2e 20 49 66 |s of the| URL. If|
|00004450| 20 74 68 65 0d 20 20 20 | 20 20 2a 20 72 6f 75 74 | the. | * rout|
|00004460| 69 6e 65 20 72 65 74 75 | 72 6e 73 20 61 6e 20 65 |ine retu|rns an e|
|00004470| 72 72 6f 72 20 74 68 65 | 6e 20 74 68 65 73 65 20 |rror the|n these |
|00004480| 6e 65 77 20 62 6f 75 6e | 64 61 72 69 65 73 20 6d |new boun|daries m|
|00004490| 61 79 20 62 65 0d 20 20 | 20 20 20 2a 20 69 6e 76 |ay be. | * inv|
|000044a0| 61 6c 69 64 20 62 75 74 | 20 74 68 65 79 20 77 69 |alid but| they wi|
|000044b0| 6c 6c 20 62 65 20 63 6c | 6f 73 65 2e 0d 20 20 20 |ll be cl|ose.. |
|000044c0| 20 20 2a 20 54 68 65 20 | 69 6e 63 6f 6d 69 6e 67 | * The |incoming|
|000044d0| 20 75 72 6c 20 68 61 6e | 64 6c 65 20 6d 75 73 74 | url han|dle must|
|000044e0| 20 6e 6f 74 20 62 65 20 | 6e 69 6c 2e 20 20 54 68 | not be |nil. Th|
|000044f0| 65 20 72 65 73 75 6c 74 | 69 6e 67 20 55 52 4c 20 |e result|ing URL |
|00004500| 69 73 20 6e 6f 72 6d 61 | 6c 69 73 65 64 0d 20 20 |is norma|lised. |
|00004510| 20 20 20 2a 20 61 6e 64 | 20 63 6f 70 69 65 64 20 | * and| copied |
|00004520| 69 6e 74 6f 20 74 68 65 | 20 75 72 6c 20 68 61 6e |into the| url han|
|00004530| 64 6c 65 2c 20 77 68 69 | 63 68 20 69 73 20 72 65 |dle, whi|ch is re|
|00004540| 73 69 7a 65 64 20 74 6f | 20 66 69 74 2e 0d 20 20 |sized to| fit.. |
|00004550| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00004560| 69 6f 6e 20 49 43 4c 61 | 75 6e 63 68 55 52 4c 28 |ion ICLa|unchURL(|
|00004570| 69 6e 73 74 20 3a 20 49 | 43 49 6e 73 74 61 6e 63 |inst : I|CInstanc|
|00004580| 65 3b 20 68 69 6e 74 20 | 3a 20 53 74 72 32 35 35 |e; hint |: Str255|
|00004590| 3b 20 64 61 74 61 20 3a | 20 50 74 72 3b 20 6c 65 |; data :| Ptr; le|
|000045a0| 6e 20 3a 20 6c 6f 6e 67 | 69 6e 74 3b 20 76 61 72 |n : long|int; var|
|000045b0| 20 73 65 6c 53 74 61 72 | 74 20 3a 20 6c 6f 6e 67 | selStar|t : long|
|000045c0| 69 6e 74 3b 20 76 61 72 | 20 73 65 6c 45 6e 64 20 |int; var| selEnd |
|000045d0| 3a 20 6c 6f 6e 67 69 6e | 74 29 20 3a 20 49 43 45 |: longin|t) : ICE|
|000045e0| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 52 65 71 |rror;. | (* Req|
|000045f0| 75 69 72 65 73 20 49 43 | 20 31 2e 31 2e 0d 20 20 |uires IC| 1.1.. |
|00004600| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00004610| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00004620| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00004630| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00004640| 65 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 64 6f |e.. |* You do|
|00004650| 20 6e 6f 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 | not hav|e to be |
|00004660| 69 6e 73 69 64 65 20 61 | 6e 20 49 43 42 65 67 69 |inside a|n ICBegi|
|00004670| 6e 2f 45 6e 64 20 70 61 | 69 72 20 74 6f 20 63 61 |n/End pa|ir to ca|
|00004680| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ll this |routine.|
|00004690| 0d 20 20 20 20 20 2a 20 | 50 61 72 73 65 73 20 61 |. * |Parses a|
|000046a0| 20 55 52 4c 20 6f 75 74 | 20 6f 66 20 74 68 65 20 | URL out| of the |
|000046b0| 73 70 65 63 69 66 69 65 | 64 20 74 65 78 74 20 61 |specifie|d text a|
|000046c0| 6e 64 20 66 65 65 64 73 | 20 69 74 20 6f 66 66 20 |nd feeds| it off |
|000046d0| 74 6f 20 74 68 65 0d 20 | 20 20 20 20 2a 20 61 70 |to the. | * ap|
|000046e0| 70 72 6f 70 72 69 61 74 | 65 20 68 65 6c 70 65 72 |propriat|e helper|
|000046f0| 2e 0d 20 20 20 20 20 2a | 20 68 69 6e 74 20 69 6e |.. *| hint in|
|00004700| 64 69 63 61 74 65 73 20 | 74 68 65 20 64 65 66 61 |dicates |the defa|
|00004710| 75 6c 74 20 73 63 68 65 | 6d 65 20 66 6f 72 20 55 |ult sche|me for U|
|00004720| 52 4c 73 20 6f 66 20 74 | 68 65 20 66 6f 72 6d 20 |RLs of t|he form |
|00004730| 22 6e 61 6d 65 40 61 64 | 64 72 65 73 73 22 2e 0d |"name@ad|dress"..|
|00004740| 20 20 20 20 20 2a 20 49 | 66 20 68 69 6e 74 20 69 | * I|f hint i|
|00004750| 73 20 74 68 65 20 65 6d | 70 74 79 20 73 74 72 69 |s the em|pty stri|
|00004760| 6e 67 20 74 68 65 6e 20 | 55 52 4c 73 20 6f 66 20 |ng then |URLs of |
|00004770| 74 68 61 74 20 66 6f 72 | 6d 20 61 72 65 20 6e 6f |that for|m are no|
|00004780| 74 20 61 6c 6c 6f 77 65 | 64 2e 0d 20 20 20 20 20 |t allowe|d.. |
|00004790| 2a 20 64 61 74 61 20 70 | 6f 69 6e 74 73 20 74 6f |* data p|oints to|
|000047a0| 20 74 68 65 20 73 74 61 | 72 74 20 6f 66 20 74 68 | the sta|rt of th|
|000047b0| 65 20 74 65 78 74 2e 20 | 49 74 20 6d 75 73 74 20 |e text. |It must |
|000047c0| 6e 6f 74 20 62 65 20 6e | 69 6c 2e 0d 20 20 20 20 |not be n|il.. |
|000047d0| 20 2a 20 6c 65 6e 20 69 | 6e 64 69 63 61 74 65 73 | * len i|ndicates|
|000047e0| 20 74 68 65 20 6c 65 6e | 67 74 68 20 6f 66 20 74 | the len|gth of t|
|000047f0| 68 65 20 74 65 78 74 2e | 20 49 74 20 6d 75 73 74 |he text.| It must|
|00004800| 20 62 65 20 6e 6f 6e 2d | 6e 65 67 61 74 69 76 65 | be non-|negative|
|00004810| 2e 0d 20 20 20 20 20 2a | 20 73 65 6c 53 74 61 72 |.. *| selStar|
|00004820| 74 20 61 6e 64 20 73 65 | 6c 45 6e 64 20 73 68 6f |t and se|lEnd sho|
|00004830| 75 6c 64 20 62 65 20 70 | 61 73 73 65 64 20 69 6e |uld be p|assed in|
|00004840| 20 61 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | as the |current |
|00004850| 73 65 6c 65 63 74 69 6f | 6e 20 6f 66 0d 20 20 20 |selectio|n of. |
|00004860| 20 20 2a 20 74 68 65 20 | 74 65 78 74 2e 20 54 68 | * the |text. Th|
|00004870| 69 73 20 73 65 6c 65 63 | 74 69 6f 6e 20 69 73 20 |is selec|tion is |
|00004880| 67 69 76 65 6e 20 69 6e | 20 74 68 65 20 73 61 6d |given in| the sam|
|00004890| 65 20 6d 61 6e 6e 65 72 | 20 61 73 20 54 65 78 74 |e manner| as Text|
|000048a0| 45 64 69 74 2c 0d 20 20 | 20 20 20 2a 20 69 65 20 |Edit,. | * ie |
|000048b0| 69 66 20 73 65 6c 53 74 | 61 72 74 20 3d 20 73 65 |if selSt|art = se|
|000048c0| 6c 45 6e 64 20 74 68 65 | 6e 20 74 68 65 72 65 20 |lEnd the|n there |
|000048d0| 69 73 20 6e 6f 20 73 65 | 6c 65 63 74 69 6f 6e 20 |is no se|lection |
|000048e0| 6f 6e 6c 79 20 61 6e 20 | 69 6e 73 65 72 74 69 6f |only an |insertio|
|000048f0| 6e 0d 20 20 20 20 20 2a | 20 70 6f 69 6e 74 2e 20 |n. *| point. |
|00004900| 41 6c 73 6f 20 73 65 6c | 53 74 61 72 74 20 b2 20 |Also sel|Start . |
|00004910| 73 65 6c 45 6e 64 20 61 | 6e 64 20 30 20 b2 20 73 |selEnd a|nd 0 . s|
|00004920| 65 6c 53 74 61 72 74 20 | b2 20 6c 65 6e 20 61 6e |elStart |. len an|
|00004930| 64 20 30 20 b2 20 73 65 | 6c 45 6e 64 20 b2 20 6c |d 0 . se|lEnd . l|
|00004940| 65 6e 2e 0d 20 20 20 20 | 20 2a 20 73 65 6c 53 74 |en.. | * selSt|
|00004950| 61 72 74 20 61 6e 64 20 | 73 65 6c 45 6e 64 20 61 |art and |selEnd a|
|00004960| 72 65 20 72 65 74 75 72 | 6e 65 64 20 61 73 20 74 |re retur|ned as t|
|00004970| 68 65 20 62 6f 75 6e 64 | 73 20 6f 66 20 74 68 65 |he bound|s of the|
|00004980| 20 55 52 4c 2e 20 49 66 | 20 74 68 65 0d 20 20 20 | URL. If| the. |
|00004990| 20 20 2a 20 72 6f 75 74 | 69 6e 65 20 72 65 74 75 | * rout|ine retu|
|000049a0| 72 6e 73 20 61 6e 20 65 | 72 72 6f 72 20 74 68 65 |rns an e|rror the|
|000049b0| 6e 20 74 68 65 73 65 20 | 6e 65 77 20 62 6f 75 6e |n these |new boun|
|000049c0| 64 61 72 69 65 73 20 6d | 61 79 20 62 65 0d 20 20 |daries m|ay be. |
|000049d0| 20 20 20 2a 20 69 6e 76 | 61 6c 69 64 20 62 75 74 | * inv|alid but|
|000049e0| 20 74 68 65 79 20 77 69 | 6c 6c 20 62 65 20 63 6c | they wi|ll be cl|
|000049f0| 6f 73 65 2e 0d 20 20 20 | 20 20 2a 20 54 68 65 20 |ose.. | * The |
|00004a00| 55 52 4c 20 69 73 20 70 | 61 72 73 65 64 20 6f 75 |URL is p|arsed ou|
|00004a10| 74 20 6f 66 20 74 68 65 | 20 74 65 78 74 20 61 6e |t of the| text an|
|00004a20| 64 20 70 61 73 73 65 64 | 20 6f 66 66 20 74 6f 20 |d passed| off to |
|00004a30| 74 68 65 20 61 70 70 72 | 6f 70 72 69 61 74 65 0d |the appr|opriate.|
|00004a40| 20 20 20 20 20 2a 20 68 | 65 6c 70 65 72 20 75 73 | * h|elper us|
|00004a50| 69 6e 67 20 74 68 65 20 | 47 55 52 4c 20 41 70 70 |ing the |GURL App|
|00004a60| 6c 65 45 76 65 6e 74 2e | 0d 20 20 20 20 20 2a 29 |leEvent.|. *)|
|00004a70| 0d 20 20 0d 20 20 28 2a | 20 2a 2a 2a 2a 2a 20 4d |. . (*| ***** M|
|00004a80| 61 70 70 69 6e 67 73 20 | 52 6f 75 74 69 6e 65 73 |appings |Routines|
|00004a90| 20 2a 2a 2a 2a 2a 0d 20 | 20 20 2a 20 0d 20 20 20 | *****. | * . |
|00004aa0| 2a 20 52 6f 75 74 69 6e | 65 73 20 66 6f 72 20 69 |* Routin|es for i|
|00004ab0| 6e 74 65 72 72 6f 67 61 | 74 69 6e 67 20 6d 61 70 |nterroga|ting map|
|00004ac0| 70 69 6e 67 73 20 64 61 | 74 61 62 61 73 65 2e 0d |pings da|tabase..|
|00004ad0| 20 20 20 2a 20 0d 20 20 | 20 2a 20 2d 2d 2d 2d 2d | * . | * -----|
|00004ae0| 20 48 69 67 68 20 4c 65 | 76 65 6c 20 52 6f 75 74 | High Le|vel Rout|
|00004af0| 69 6e 65 73 20 2d 2d 2d | 2d 2d 0d 20 20 20 2a 29 |ines ---|--. *)|
|00004b00| 0d 20 20 0d 20 20 66 75 | 6e 63 74 69 6f 6e 20 49 |. . fu|nction I|
|00004b10| 43 4d 61 70 46 69 6c 65 | 6e 61 6d 65 28 69 6e 73 |CMapFile|name(ins|
|00004b20| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|00004b30| 66 69 6c 65 6e 61 6d 65 | 20 3a 20 53 74 72 32 35 |filename| : Str25|
|00004b40| 35 3b 20 76 61 72 20 65 | 6e 74 72 79 20 3a 20 49 |5; var e|ntry : I|
|00004b50| 43 4d 61 70 45 6e 74 72 | 79 29 20 3a 20 49 43 45 |CMapEntr|y) : ICE|
|00004b60| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 52 65 71 |rror;. | (* Req|
|00004b70| 75 69 72 65 73 20 49 43 | 20 31 2e 31 2e 0d 20 20 |uires IC| 1.1.. |
|00004b80| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00004b90| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00004ba0| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00004bb0| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00004bc0| 65 2e 0d 20 20 20 20 20 | 2a 20 49 66 20 79 6f 75 |e.. |* If you|
|00004bd0| 20 61 72 65 20 67 65 74 | 74 69 6e 67 20 6f 72 20 | are get|ting or |
|00004be0| 73 65 74 74 69 6e 67 20 | 6d 75 6c 74 69 70 6c 65 |setting |multiple|
|00004bf0| 20 70 72 65 66 65 72 65 | 6e 63 65 73 2c 20 79 6f | prefere|nces, yo|
|00004c00| 75 20 73 68 6f 75 6c 64 | 20 70 6c 61 63 65 0d 20 |u should| place. |
|00004c10| 20 20 20 20 2a 20 74 68 | 65 73 65 20 63 61 6c 6c | * th|ese call|
|00004c20| 73 20 77 69 74 68 69 6e | 20 61 6e 20 49 43 42 65 |s within| an ICBe|
|00004c30| 67 69 6e 2f 49 43 45 6e | 64 20 70 61 69 72 2e 0d |gin/ICEn|d pair..|
|00004c40| 20 20 20 20 20 2a 20 49 | 66 20 79 6f 75 20 63 61 | * I|f you ca|
|00004c50| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |ll this |routine |
|00004c60| 6f 75 74 73 69 64 65 20 | 6f 66 20 73 75 63 68 20 |outside |of such |
|00004c70| 61 20 70 61 69 72 2c 20 | 69 74 20 69 6d 70 6c 69 |a pair, |it impli|
|00004c80| 63 69 74 6c 79 0d 20 20 | 20 20 20 2a 20 63 61 6c |citly. | * cal|
|00004c90| 6c 73 20 49 43 42 65 67 | 69 6e 28 69 6e 73 74 2c |ls ICBeg|in(inst,|
|00004ca0| 20 69 63 52 65 61 64 57 | 72 69 74 65 50 65 72 6d | icReadW|ritePerm|
|00004cb0| 29 2e 0d 20 20 20 20 20 | 2a 20 54 61 6b 65 73 20 |).. |* Takes |
|00004cc0| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 61 6e 20 69 |the name| of an i|
|00004cd0| 6e 63 6f 6d 69 6e 67 20 | 66 69 6c 65 20 61 6e 64 |ncoming |file and|
|00004ce0| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 6d 6f 73 | returns| the mos|
|00004cf0| 74 20 61 70 70 72 6f 70 | 72 69 61 74 65 0d 20 20 |t approp|riate. |
|00004d00| 20 20 20 2a 20 6d 61 70 | 70 69 6e 67 73 20 64 61 | * map|pings da|
|00004d10| 74 61 62 61 73 65 20 65 | 6e 74 72 79 2c 20 62 61 |tabase e|ntry, ba|
|00004d20| 73 65 64 20 6f 6e 20 69 | 74 73 20 65 78 74 65 6e |sed on i|ts exten|
|00004d30| 73 69 6f 6e 2e 0d 20 20 | 20 20 20 2a 20 66 69 6c |sion.. | * fil|
|00004d40| 65 6e 61 6d 65 20 6d 75 | 73 74 20 6e 6f 74 20 62 |ename mu|st not b|
|00004d50| 65 20 74 68 65 20 65 6d | 70 74 79 20 73 74 72 69 |e the em|pty stri|
|00004d60| 6e 67 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |ng.. | * Retur|
|00004d70| 6e 73 20 69 63 50 72 65 | 66 4e 6f 74 46 6f 75 6e |ns icPre|fNotFoun|
|00004d80| 64 45 72 72 20 69 66 20 | 6e 6f 20 73 75 69 74 61 |dErr if |no suita|
|00004d90| 62 6c 65 20 65 6e 74 72 | 79 20 69 73 20 66 6f 75 |ble entr|y is fou|
|00004da0| 6e 64 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |nd.. | *). . |
|00004db0| 20 66 75 6e 63 74 69 6f | 6e 20 49 43 4d 61 70 54 | functio|n ICMapT|
|00004dc0| 79 70 65 43 72 65 61 74 | 6f 72 28 69 6e 73 74 20 |ypeCreat|or(inst |
|00004dd0| 3a 20 49 43 49 6e 73 74 | 61 6e 63 65 3b 20 66 54 |: ICInst|ance; fT|
|00004de0| 79 70 65 20 3a 20 4f 53 | 54 79 70 65 3b 20 66 43 |ype : OS|Type; fC|
|00004df0| 72 65 61 74 6f 72 20 3a | 20 4f 53 54 79 70 65 3b |reator :| OSType;|
|00004e00| 20 66 69 6c 65 6e 61 6d | 65 20 3a 20 53 74 72 32 | filenam|e : Str2|
|00004e10| 35 35 3b 20 76 61 72 20 | 65 6e 74 72 79 20 3a 20 |55; var |entry : |
|00004e20| 49 43 4d 61 70 45 6e 74 | 72 79 29 20 3a 20 49 43 |ICMapEnt|ry) : IC|
|00004e30| 45 72 72 6f 72 3b 0d 20 | 20 20 20 28 2a 20 52 65 |Error;. | (* Re|
|00004e40| 71 75 69 72 65 73 20 49 | 43 20 31 2e 31 2e 0d 20 |quires I|C 1.1.. |
|00004e50| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 | * Yo|u must s|
|00004e60| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00004e70| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00004e80| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00004e90| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |ne.. | * You m|
|00004ea0| 75 73 74 20 62 65 20 69 | 6e 73 69 64 65 20 61 6e |ust be i|nside an|
|00004eb0| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|00004ec0| 72 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |r to cal|l this r|
|00004ed0| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 54 |outine..| * T|
|00004ee0| 61 6b 65 73 20 74 68 65 | 20 74 79 70 65 20 61 6e |akes the| type an|
|00004ef0| 64 20 63 72 65 61 74 6f | 72 20 28 61 6e 64 20 6f |d creato|r (and o|
|00004f00| 70 74 69 6f 6e 61 6c 6c | 79 20 74 68 65 20 6e 61 |ptionall|y the na|
|00004f10| 6d 65 29 20 6f 66 20 61 | 6e 20 6f 75 74 67 6f 69 |me) of a|n outgoi|
|00004f20| 6e 67 0d 20 20 20 20 20 | 2a 20 66 69 6c 65 20 61 |ng. |* file a|
|00004f30| 6e 64 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 6d |nd retur|ns the m|
|00004f40| 6f 73 74 20 61 70 70 72 | 6f 70 72 69 61 74 65 20 |ost appr|opriate |
|00004f50| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|00004f60| 65 20 65 6e 74 72 79 2e | 0d 20 20 20 20 20 2a 20 |e entry.|. * |
|00004f70| 54 68 65 20 66 69 6c 65 | 6e 61 6d 65 20 6d 61 79 |The file|name may|
|00004f80| 20 62 65 20 65 69 74 68 | 65 72 20 74 68 65 20 6e | be eith|er the n|
|00004f90| 61 6d 65 20 6f 66 20 74 | 68 65 20 6f 75 74 67 6f |ame of t|he outgo|
|00004fa0| 69 6e 67 20 66 69 6c 65 | 20 6f 72 0d 20 20 20 20 |ing file| or. |
|00004fb0| 20 2a 20 74 68 65 20 65 | 6d 70 74 79 20 73 74 72 | * the e|mpty str|
|00004fc0| 69 6e 67 2e 0d 20 20 20 | 20 20 2a 20 52 65 74 75 |ing.. | * Retu|
|00004fd0| 72 6e 73 20 69 63 50 72 | 65 66 4e 6f 74 46 6f 75 |rns icPr|efNotFou|
|00004fe0| 6e 64 45 72 72 20 69 66 | 20 6e 6f 20 73 75 69 74 |ndErr if| no suit|
|00004ff0| 61 62 6c 65 20 65 6e 74 | 72 79 20 66 6f 75 6e 64 |able ent|ry found|
|00005000| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 28 |.. *|). . (|
|00005010| 2a 20 2d 2d 2d 2d 2d 20 | 4d 69 64 20 4c 65 76 65 |* ----- |Mid Leve|
|00005020| 6c 20 52 6f 75 74 69 6e | 65 73 20 2d 2d 2d 2d 2d |l Routin|es -----|
|00005030| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|00005040| 6e 20 49 43 4d 61 70 45 | 6e 74 72 69 65 73 46 69 |n ICMapE|ntriesFi|
|00005050| 6c 65 6e 61 6d 65 28 69 | 6e 73 74 20 3a 20 49 43 |lename(i|nst : IC|
|00005060| 49 6e 73 74 61 6e 63 65 | 3b 20 65 6e 74 72 69 65 |Instance|; entrie|
|00005070| 73 20 3a 20 48 61 6e 64 | 6c 65 3b 20 66 69 6c 65 |s : Hand|le; file|
|00005080| 6e 61 6d 65 20 3a 20 53 | 74 72 32 35 35 3b 20 76 |name : S|tr255; v|
|00005090| 61 72 20 65 6e 74 72 79 | 20 3a 20 49 43 4d 61 70 |ar entry| : ICMap|
|000050a0| 45 6e 74 72 79 29 20 3a | 20 49 43 45 72 72 6f 72 |Entry) :| ICError|
|000050b0| 3b 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |;. (*| Require|
|000050c0| 73 20 49 43 20 31 2e 31 | 2e 0d 20 20 20 20 20 2a |s IC 1.1|.. *|
|000050d0| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|000050e0| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|000050f0| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00005100| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00005110| 20 20 20 20 2a 20 59 6f | 75 20 64 6f 20 6e 6f 74 | * Yo|u do not|
|00005120| 20 68 61 76 65 20 74 6f | 20 62 65 20 69 6e 73 69 | have to| be insi|
|00005130| 64 65 20 61 6e 20 49 43 | 42 65 67 69 6e 2f 45 6e |de an IC|Begin/En|
|00005140| 64 20 70 61 69 72 20 74 | 6f 20 63 61 6c 6c 20 74 |d pair t|o call t|
|00005150| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00005160| 20 20 2a 20 54 61 6b 65 | 73 20 74 68 65 20 6e 61 | * Take|s the na|
|00005170| 6d 65 20 6f 66 20 61 6e | 20 69 6e 63 6f 6d 69 6e |me of an| incomin|
|00005180| 67 20 66 69 6c 65 20 61 | 6e 64 20 72 65 74 75 72 |g file a|nd retur|
|00005190| 6e 73 20 74 68 65 20 6d | 6f 73 74 20 61 70 70 72 |ns the m|ost appr|
|000051a0| 6f 70 72 69 61 74 65 0d | 20 20 20 20 20 2a 20 6d |opriate.| * m|
|000051b0| 61 70 70 69 6e 67 73 20 | 64 61 74 61 62 61 73 65 |appings |database|
|000051c0| 20 65 6e 74 72 79 2c 20 | 62 61 73 65 64 20 6f 6e | entry, |based on|
|000051d0| 20 69 74 73 20 65 78 74 | 65 6e 73 69 6f 6e 2e 0d | its ext|ension..|
|000051e0| 20 20 20 20 20 2a 20 65 | 6e 74 72 69 65 73 20 6d | * e|ntries m|
|000051f0| 75 73 74 20 62 65 20 61 | 20 68 61 6e 64 6c 65 20 |ust be a| handle |
|00005200| 74 6f 20 61 20 76 61 6c | 69 64 20 49 43 20 6d 61 |to a val|id IC ma|
|00005210| 70 70 69 6e 67 73 20 64 | 61 74 61 62 61 73 65 20 |ppings d|atabase |
|00005220| 70 72 65 66 65 72 65 6e | 63 65 2e 0d 20 20 20 20 |preferen|ce.. |
|00005230| 20 2a 20 66 69 6c 65 6e | 61 6d 65 20 6d 75 73 74 | * filen|ame must|
|00005240| 20 6e 6f 74 20 62 65 20 | 74 68 65 20 65 6d 70 74 | not be |the empt|
|00005250| 79 20 73 74 72 69 6e 67 | 2e 0d 20 20 20 20 20 2a |y string|.. *|
|00005260| 20 52 65 74 75 72 6e 73 | 20 69 63 50 72 65 66 4e | Returns| icPrefN|
|00005270| 6f 74 46 6f 75 6e 64 45 | 72 72 20 69 66 20 6e 6f |otFoundE|rr if no|
|00005280| 20 73 75 69 74 61 62 6c | 65 20 65 6e 74 72 79 20 | suitabl|e entry |
|00005290| 69 73 20 66 6f 75 6e 64 | 2e 0d 20 20 20 20 20 2a |is found|.. *|
|000052a0| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|000052b0| 49 43 4d 61 70 45 6e 74 | 72 69 65 73 54 79 70 65 |ICMapEnt|riesType|
|000052c0| 43 72 65 61 74 6f 72 28 | 69 6e 73 74 20 3a 20 49 |Creator(|inst : I|
|000052d0| 43 49 6e 73 74 61 6e 63 | 65 3b 20 65 6e 74 72 69 |CInstanc|e; entri|
|000052e0| 65 73 20 3a 20 48 61 6e | 64 6c 65 3b 20 66 54 79 |es : Han|dle; fTy|
|000052f0| 70 65 20 3a 20 4f 53 54 | 79 70 65 3b 20 66 43 72 |pe : OST|ype; fCr|
|00005300| 65 61 74 6f 72 20 3a 20 | 4f 53 54 79 70 65 3b 20 |eator : |OSType; |
|00005310| 66 69 6c 65 6e 61 6d 65 | 20 3a 20 53 74 72 32 35 |filename| : Str25|
|00005320| 35 3b 20 76 61 72 20 65 | 6e 74 72 79 20 3a 20 49 |5; var e|ntry : I|
|00005330| 43 4d 61 70 45 6e 74 72 | 79 29 20 3a 20 49 43 45 |CMapEntr|y) : ICE|
|00005340| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 52 65 71 |rror;. | (* Req|
|00005350| 75 69 72 65 73 20 49 43 | 20 31 2e 31 2e 0d 20 20 |uires IC| 1.1.. |
|00005360| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00005370| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00005380| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00005390| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|000053a0| 65 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 64 6f |e.. |* You do|
|000053b0| 20 6e 6f 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 | not hav|e to be |
|000053c0| 69 6e 73 69 64 65 20 61 | 6e 20 49 43 42 65 67 69 |inside a|n ICBegi|
|000053d0| 6e 2f 45 6e 64 20 70 61 | 69 72 20 74 6f 20 63 61 |n/End pa|ir to ca|
|000053e0| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ll this |routine.|
|000053f0| 0d 20 20 20 20 20 2a 20 | 54 61 6b 65 73 20 74 68 |. * |Takes th|
|00005400| 65 20 74 79 70 65 20 61 | 6e 64 20 63 72 65 61 74 |e type a|nd creat|
|00005410| 6f 72 20 28 61 6e 64 20 | 6f 70 74 69 6f 6e 61 6c |or (and |optional|
|00005420| 6c 79 20 74 68 65 20 6e | 61 6d 65 29 20 6f 66 20 |ly the n|ame) of |
|00005430| 61 6e 20 6f 75 74 67 6f | 69 6e 67 0d 20 20 20 20 |an outgo|ing. |
|00005440| 20 2a 20 66 69 6c 65 20 | 61 6e 64 20 72 65 74 75 | * file |and retu|
|00005450| 72 6e 73 20 74 68 65 20 | 6d 6f 73 74 20 61 70 70 |rns the |most app|
|00005460| 72 6f 70 72 69 61 74 65 | 20 6d 61 70 70 69 6e 67 |ropriate| mapping|
|00005470| 73 20 64 61 74 61 62 61 | 73 65 20 65 6e 74 72 79 |s databa|se entry|
|00005480| 2e 0d 20 20 20 20 20 2a | 20 65 6e 74 72 69 65 73 |.. *| entries|
|00005490| 20 6d 75 73 74 20 62 65 | 20 61 20 68 61 6e 64 6c | must be| a handl|
|000054a0| 65 20 74 6f 20 61 20 76 | 61 6c 69 64 20 49 43 20 |e to a v|alid IC |
|000054b0| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|000054c0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 2e 0d 20 20 |e prefer|ence.. |
|000054d0| 20 20 20 2a 20 54 68 65 | 20 66 69 6c 65 6e 61 6d | * The| filenam|
|000054e0| 65 20 6d 61 79 20 62 65 | 20 65 69 74 68 65 72 20 |e may be| either |
|000054f0| 74 68 65 20 6e 61 6d 65 | 20 6f 66 20 74 68 65 20 |the name| of the |
|00005500| 6f 75 74 67 6f 69 6e 67 | 20 66 69 6c 65 20 6f 72 |outgoing| file or|
|00005510| 0d 20 20 20 20 20 2a 20 | 74 68 65 20 65 6d 70 74 |. * |the empt|
|00005520| 79 20 73 74 72 69 6e 67 | 2e 0d 20 20 20 20 20 2a |y string|.. *|
|00005530| 20 52 65 74 75 72 6e 73 | 20 69 63 50 72 65 66 4e | Returns| icPrefN|
|00005540| 6f 74 46 6f 75 6e 64 45 | 72 72 20 69 66 20 6e 6f |otFoundE|rr if no|
|00005550| 20 73 75 69 74 61 62 6c | 65 20 65 6e 74 72 79 20 | suitabl|e entry |
|00005560| 66 6f 75 6e 64 2e 0d 20 | 20 20 20 20 2a 29 0d 20 |found.. | *). |
|00005570| 20 0d 20 20 28 2a 20 2d | 2d 2d 2d 2d 20 4c 6f 77 | . (* -|---- Low|
|00005580| 20 4c 65 76 65 6c 20 52 | 6f 75 74 69 6e 65 73 20 | Level R|outines |
|00005590| 2d 2d 2d 2d 2d 20 2a 29 | 0d 20 20 0d 20 20 66 75 |----- *)|. . fu|
|000055a0| 6e 63 74 69 6f 6e 20 49 | 43 43 6f 75 6e 74 4d 61 |nction I|CCountMa|
|000055b0| 70 45 6e 74 72 69 65 73 | 28 69 6e 73 74 20 3a 20 |pEntries|(inst : |
|000055c0| 49 43 49 6e 73 74 61 6e | 63 65 3b 20 65 6e 74 72 |ICInstan|ce; entr|
|000055d0| 69 65 73 20 3a 20 48 61 | 6e 64 6c 65 3b 20 76 61 |ies : Ha|ndle; va|
|000055e0| 72 20 63 6f 75 6e 74 20 | 3a 20 6c 6f 6e 67 69 6e |r count |: longin|
|000055f0| 74 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |t) : ICE|rror;. |
|00005600| 20 20 28 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | (* Req|uires IC|
|00005610| 20 31 2e 31 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 | 1.1.. | * You|
|00005620| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 20 61 20 | must sp|ecify a |
|00005630| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 62 65 |configur|ation be|
|00005640| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|00005650| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00005660| 2a 20 59 6f 75 20 64 6f | 20 6e 6f 74 20 68 61 76 |* You do| not hav|
|00005670| 65 20 74 6f 20 62 65 20 | 69 6e 73 69 64 65 20 61 |e to be |inside a|
|00005680| 6e 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |n ICBegi|n/End pa|
|00005690| 69 72 20 74 6f 20 63 61 | 6c 6c 20 74 68 69 73 20 |ir to ca|ll this |
|000056a0| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|000056b0| 43 6f 75 6e 74 73 20 74 | 68 65 20 6e 75 6d 62 65 |Counts t|he numbe|
|000056c0| 72 20 6f 66 20 65 6e 74 | 72 69 65 73 20 69 6e 20 |r of ent|ries in |
|000056d0| 74 68 65 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 |the mapp|ings dat|
|000056e0| 61 62 61 73 65 2e 0d 20 | 20 20 20 20 2a 20 65 6e |abase.. | * en|
|000056f0| 74 72 69 65 73 20 6d 75 | 73 74 20 62 65 20 61 20 |tries mu|st be a |
|00005700| 68 61 6e 64 6c 65 20 74 | 6f 20 61 20 76 61 6c 69 |handle t|o a vali|
|00005710| 64 20 49 43 20 6d 61 70 | 70 69 6e 67 73 20 64 61 |d IC map|pings da|
|00005720| 74 61 62 61 73 65 20 70 | 72 65 66 65 72 65 6e 63 |tabase p|referenc|
|00005730| 65 2e 0d 20 20 20 20 20 | 2a 20 63 6f 75 6e 74 20 |e.. |* count |
|00005740| 69 73 20 73 65 74 20 74 | 6f 20 74 68 65 20 6e 75 |is set t|o the nu|
|00005750| 6d 62 65 72 20 6f 66 20 | 65 6e 74 72 69 65 73 2e |mber of |entries.|
|00005760| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 66 75 |. *)|. . fu|
|00005770| 6e 63 74 69 6f 6e 20 49 | 43 47 65 74 49 6e 64 4d |nction I|CGetIndM|
|00005780| 61 70 45 6e 74 72 79 28 | 69 6e 73 74 20 3a 20 49 |apEntry(|inst : I|
|00005790| 43 49 6e 73 74 61 6e 63 | 65 3b 20 65 6e 74 72 69 |CInstanc|e; entri|
|000057a0| 65 73 20 3a 20 48 61 6e | 64 6c 65 3b 20 6e 64 78 |es : Han|dle; ndx|
|000057b0| 20 3a 20 6c 6f 6e 67 69 | 6e 74 3b 20 76 61 72 20 | : longi|nt; var |
|000057c0| 70 6f 73 20 3a 20 6c 6f | 6e 67 69 6e 74 3b 20 76 |pos : lo|ngint; v|
|000057d0| 61 72 20 65 6e 74 72 79 | 20 3a 20 49 43 4d 61 70 |ar entry| : ICMap|
|000057e0| 45 6e 74 72 79 29 20 3a | 20 49 43 45 72 72 6f 72 |Entry) :| ICError|
|000057f0| 3b 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |;. (*| Require|
|00005800| 73 20 49 43 20 31 2e 31 | 2e 0d 20 20 20 20 20 2a |s IC 1.1|.. *|
|00005810| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00005820| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00005830| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00005840| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00005850| 20 20 20 20 2a 20 59 6f | 75 20 64 6f 20 6e 6f 74 | * Yo|u do not|
|00005860| 20 68 61 76 65 20 74 6f | 20 62 65 20 69 6e 73 69 | have to| be insi|
|00005870| 64 65 20 61 6e 20 49 43 | 42 65 67 69 6e 2f 45 6e |de an IC|Begin/En|
|00005880| 64 20 70 61 69 72 20 74 | 6f 20 63 61 6c 6c 20 74 |d pair t|o call t|
|00005890| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|000058a0| 20 20 2a 20 47 65 74 73 | 20 74 68 65 20 6e 64 78 | * Gets| the ndx|
|000058b0| 27 74 68 20 65 6e 74 72 | 79 20 69 6e 20 74 68 65 |'th entr|y in the|
|000058c0| 20 6d 61 70 70 69 6e 67 | 73 20 64 61 74 61 62 61 | mapping|s databa|
|000058d0| 73 65 2e 0d 20 20 20 20 | 20 2a 20 65 6e 74 72 69 |se.. | * entri|
|000058e0| 65 73 20 6d 75 73 74 20 | 62 65 20 61 20 68 61 6e |es must |be a han|
|000058f0| 64 6c 65 20 74 6f 20 61 | 20 76 61 6c 69 64 20 49 |dle to a| valid I|
|00005900| 43 20 6d 61 70 70 69 6e | 67 73 20 64 61 74 61 62 |C mappin|gs datab|
|00005910| 61 73 65 20 70 72 65 66 | 65 72 65 6e 63 65 2e 0d |ase pref|erence..|
|00005920| 20 20 20 20 20 2a 20 6e | 64 78 20 6d 75 73 74 20 | * n|dx must |
|00005930| 62 65 20 69 6e 20 74 68 | 65 20 72 61 6e 67 65 20 |be in th|e range |
|00005940| 66 72 6f 6d 20 31 20 74 | 6f 20 74 68 65 20 6e 75 |from 1 t|o the nu|
|00005950| 6d 62 65 72 20 6f 66 20 | 65 6e 74 72 69 65 73 20 |mber of |entries |
|00005960| 69 6e 20 74 68 65 20 64 | 61 74 61 62 61 73 65 2e |in the d|atabase.|
|00005970| 0d 20 20 20 20 20 2a 20 | 54 68 65 20 76 61 6c 75 |. * |The valu|
|00005980| 65 20 6f 66 20 70 6f 73 | 20 69 73 20 69 67 6e 6f |e of pos| is igno|
|00005990| 72 65 64 20 6f 6e 20 69 | 6e 70 75 74 2e 20 70 6f |red on i|nput. po|
|000059a0| 73 20 69 73 20 73 65 74 | 20 74 6f 20 74 68 65 20 |s is set| to the |
|000059b0| 70 6f 73 69 74 69 6f 6e | 20 6f 66 0d 20 20 20 20 |position| of. |
|000059c0| 20 2a 20 74 68 65 20 6e | 64 78 27 74 68 20 65 6e | * the n|dx'th en|
|000059d0| 74 72 79 20 69 6e 20 74 | 68 65 20 64 61 74 61 62 |try in t|he datab|
|000059e0| 61 73 65 20 61 6e 64 20 | 69 73 20 73 75 69 74 61 |ase and |is suita|
|000059f0| 62 6c 65 20 66 6f 72 20 | 70 61 73 73 69 6e 67 20 |ble for |passing |
|00005a00| 62 61 63 6b 0d 20 20 20 | 20 20 2a 20 69 6e 74 6f |back. | * into|
|00005a10| 20 49 43 53 65 74 4d 61 | 70 45 6e 74 72 79 2e 0d | ICSetMa|pEntry..|
|00005a20| 20 20 20 20 20 2a 20 44 | 6f 65 73 20 6e 6f 74 20 | * D|oes not |
|00005a30| 72 65 74 75 72 6e 20 61 | 6e 79 20 75 73 65 72 20 |return a|ny user |
|00005a40| 64 61 74 61 20 61 73 73 | 6f 63 69 61 74 65 64 20 |data ass|ociated |
|00005a50| 77 69 74 68 20 74 68 65 | 20 65 6e 74 72 79 2e 0d |with the| entry..|
|00005a60| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00005a70| 63 74 69 6f 6e 20 49 43 | 47 65 74 4d 61 70 45 6e |ction IC|GetMapEn|
|00005a80| 74 72 79 28 69 6e 73 74 | 20 3a 20 49 43 49 6e 73 |try(inst| : ICIns|
|00005a90| 74 61 6e 63 65 3b 20 65 | 6e 74 72 69 65 73 20 3a |tance; e|ntries :|
|00005aa0| 20 48 61 6e 64 6c 65 3b | 20 70 6f 73 20 3a 20 6c | Handle;| pos : l|
|00005ab0| 6f 6e 67 69 6e 74 3b 20 | 76 61 72 20 65 6e 74 72 |ongint; |var entr|
|00005ac0| 79 20 3a 20 49 43 4d 61 | 70 45 6e 74 72 79 29 20 |y : ICMa|pEntry) |
|00005ad0| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 20 20 28 |: ICErro|r;. (|
|00005ae0| 2a 20 52 65 71 75 69 72 | 65 73 20 49 43 20 31 2e |* Requir|es IC 1.|
|00005af0| 31 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 6d 75 |1.. |* You mu|
|00005b00| 73 74 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |st speci|fy a con|
|00005b10| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|00005b20| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00005b30| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 59 |outine..| * Y|
|00005b40| 6f 75 20 64 6f 20 6e 6f | 74 20 68 61 76 65 20 74 |ou do no|t have t|
|00005b50| 6f 20 62 65 20 69 6e 73 | 69 64 65 20 61 6e 20 49 |o be ins|ide an I|
|00005b60| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 20 |CBegin/E|nd pair |
|00005b70| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00005b80| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 52 65 74 |tine.. | * Ret|
|00005b90| 75 72 6e 73 20 74 68 65 | 20 65 6e 74 72 79 20 6c |urns the| entry l|
|00005ba0| 6f 63 61 74 65 64 20 61 | 74 20 70 6f 73 69 74 69 |ocated a|t positi|
|00005bb0| 6f 6e 20 70 6f 73 20 69 | 6e 20 74 68 65 20 6d 61 |on pos i|n the ma|
|00005bc0| 70 70 69 6e 67 73 20 64 | 61 74 61 62 61 73 65 2e |ppings d|atabase.|
|00005bd0| 0d 20 20 20 20 20 2a 20 | 65 6e 74 72 69 65 73 20 |. * |entries |
|00005be0| 6d 75 73 74 20 62 65 20 | 61 20 68 61 6e 64 6c 65 |must be |a handle|
|00005bf0| 20 74 6f 20 61 20 76 61 | 6c 69 64 20 49 43 20 6d | to a va|lid IC m|
|00005c00| 61 70 70 69 6e 67 73 20 | 64 61 74 61 62 61 73 65 |appings |database|
|00005c10| 20 70 72 65 66 65 72 65 | 6e 63 65 2e 0d 20 20 20 | prefere|nce.. |
|00005c20| 20 20 2a 20 70 6f 73 20 | 73 68 6f 75 6c 64 20 62 | * pos |should b|
|00005c30| 65 20 30 20 74 6f 20 67 | 65 74 20 74 68 65 20 66 |e 0 to g|et the f|
|00005c40| 69 72 73 74 20 65 6e 74 | 72 79 2e 20 54 6f 20 67 |irst ent|ry. To g|
|00005c50| 65 74 20 74 68 65 20 73 | 75 62 73 65 71 75 65 6e |et the s|ubsequen|
|00005c60| 74 20 65 6e 74 72 69 65 | 73 2c 20 61 64 64 0d 20 |t entrie|s, add. |
|00005c70| 20 20 20 20 2a 20 65 6e | 74 72 79 2e 74 6f 74 61 | * en|try.tota|
|00005c80| 6c 5f 73 69 7a 65 20 74 | 6f 20 70 6f 73 20 61 6e |l_size t|o pos an|
|00005c90| 64 20 69 74 65 72 61 74 | 65 2e 0d 20 20 20 20 20 |d iterat|e.. |
|00005ca0| 2a 20 44 6f 65 73 20 6e | 6f 74 20 72 65 74 75 72 |* Does n|ot retur|
|00005cb0| 6e 20 61 6e 79 20 75 73 | 65 72 20 64 61 74 61 20 |n any us|er data |
|00005cc0| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00005cd0| 74 68 65 20 65 6e 74 72 | 79 2e 0d 20 20 20 20 20 |the entr|y.. |
|00005ce0| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|00005cf0| 20 49 43 53 65 74 4d 61 | 70 45 6e 74 72 79 28 69 | ICSetMa|pEntry(i|
|00005d00| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|00005d10| 3b 20 65 6e 74 72 69 65 | 73 20 3a 20 48 61 6e 64 |; entrie|s : Hand|
|00005d20| 6c 65 3b 20 70 6f 73 20 | 3a 20 6c 6f 6e 67 69 6e |le; pos |: longin|
|00005d30| 74 3b 20 76 61 72 20 65 | 6e 74 72 79 20 3a 20 49 |t; var e|ntry : I|
|00005d40| 43 4d 61 70 45 6e 74 72 | 79 29 20 3a 20 49 43 45 |CMapEntr|y) : ICE|
|00005d50| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 52 65 71 |rror;. | (* Req|
|00005d60| 75 69 72 65 73 20 49 43 | 20 31 2e 31 2e 0d 20 20 |uires IC| 1.1.. |
|00005d70| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00005d80| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00005d90| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00005da0| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00005db0| 65 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 64 6f |e.. |* You do|
|00005dc0| 20 6e 6f 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 | not hav|e to be |
|00005dd0| 69 6e 73 69 64 65 20 61 | 6e 20 49 43 42 65 67 69 |inside a|n ICBegi|
|00005de0| 6e 2f 45 6e 64 20 70 61 | 69 72 20 74 6f 20 63 61 |n/End pa|ir to ca|
|00005df0| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ll this |routine.|
|00005e00| 0d 20 20 20 20 20 2a 20 | 53 65 74 73 20 74 68 65 |. * |Sets the|
|00005e10| 20 65 6e 74 72 79 20 6c | 6f 63 61 74 65 64 20 61 | entry l|ocated a|
|00005e20| 74 20 70 6f 73 69 74 69 | 6f 6e 20 70 6f 73 20 69 |t positi|on pos i|
|00005e30| 6e 20 74 68 65 20 6d 61 | 70 70 69 6e 67 73 20 64 |n the ma|ppings d|
|00005e40| 61 74 61 62 61 73 65 2e | 0d 20 20 20 20 20 2a 20 |atabase.|. * |
|00005e50| 65 6e 74 72 69 65 73 20 | 6d 75 73 74 20 62 65 20 |entries |must be |
|00005e60| 61 20 68 61 6e 64 6c 65 | 20 74 6f 20 61 20 76 61 |a handle| to a va|
|00005e70| 6c 69 64 20 49 43 20 6d | 61 70 70 69 6e 67 73 20 |lid IC m|appings |
|00005e80| 64 61 74 61 62 61 73 65 | 20 70 72 65 66 65 72 65 |database| prefere|
|00005e90| 6e 63 65 2e 0d 20 20 20 | 20 20 2a 20 70 6f 73 20 |nce.. | * pos |
|00005ea0| 73 68 6f 75 6c 64 20 62 | 65 20 65 69 74 68 65 72 |should b|e either|
|00005eb0| 20 61 20 76 61 6c 75 65 | 20 72 65 74 75 72 6e 65 | a value| returne|
|00005ec0| 64 20 66 72 6f 6d 20 49 | 43 47 65 74 49 6e 64 4d |d from I|CGetIndM|
|00005ed0| 61 70 45 6e 74 72 79 20 | 6f 72 20 61 20 76 61 6c |apEntry |or a val|
|00005ee0| 75 65 0d 20 20 20 20 20 | 2a 20 63 61 6c 63 75 6c |ue. |* calcul|
|00005ef0| 61 74 65 64 20 75 73 69 | 6e 67 20 49 43 47 65 74 |ated usi|ng ICGet|
|00005f00| 4d 61 70 45 6e 74 72 79 | 2e 0d 20 20 20 20 20 2a |MapEntry|.. *|
|00005f10| 20 65 6e 74 72 79 20 69 | 73 20 61 20 76 61 72 20 | entry i|s a var |
|00005f20| 70 61 72 61 6d 65 74 65 | 72 20 70 75 72 65 6c 79 |paramete|r purely|
|00005f30| 20 66 6f 72 20 73 74 61 | 63 6b 20 73 70 61 63 65 | for sta|ck space|
|00005f40| 20 72 65 61 73 6f 6e 73 | 2e 20 49 74 20 69 73 20 | reasons|. It is |
|00005f50| 6e 6f 74 0d 20 20 20 20 | 20 2a 20 6d 6f 64 69 66 |not. | * modif|
|00005f60| 69 65 64 20 69 6e 20 61 | 6e 79 20 77 61 79 2e 0d |ied in a|ny way..|
|00005f70| 20 20 20 20 20 2a 20 41 | 6e 79 20 75 73 65 72 20 | * A|ny user |
|00005f80| 64 61 74 61 20 61 73 73 | 6f 63 69 61 74 65 64 20 |data ass|ociated |
|00005f90| 77 69 74 68 20 74 68 65 | 20 65 6e 74 72 79 20 69 |with the| entry i|
|00005fa0| 73 20 75 6e 6d 6f 64 69 | 66 69 65 64 2e 0d 20 20 |s unmodi|fied.. |
|00005fb0| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00005fc0| 69 6f 6e 20 49 43 44 65 | 6c 65 74 65 4d 61 70 45 |ion ICDe|leteMapE|
|00005fd0| 6e 74 72 79 28 69 6e 73 | 74 20 3a 20 49 43 49 6e |ntry(ins|t : ICIn|
|00005fe0| 73 74 61 6e 63 65 3b 20 | 65 6e 74 72 69 65 73 20 |stance; |entries |
|00005ff0| 3a 20 48 61 6e 64 6c 65 | 3b 20 70 6f 73 20 3a 20 |: Handle|; pos : |
|00006000| 6c 6f 6e 67 69 6e 74 29 | 20 3a 20 49 43 45 72 72 |longint)| : ICErr|
|00006010| 6f 72 3b 0d 20 20 20 20 | 28 2a 20 52 65 71 75 69 |or;. |(* Requi|
|00006020| 72 65 73 20 49 43 20 31 | 2e 31 2e 0d 20 20 20 20 |res IC 1|.1.. |
|00006030| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 | * You m|ust spec|
|00006040| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00006050| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00006060| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00006070| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 64 6f 20 6e |. * |You do n|
|00006080| 6f 74 20 68 61 76 65 20 | 74 6f 20 62 65 20 69 6e |ot have |to be in|
|00006090| 73 69 64 65 20 61 6e 20 | 49 43 42 65 67 69 6e 2f |side an |ICBegin/|
|000060a0| 45 6e 64 20 70 61 69 72 | 20 74 6f 20 63 61 6c 6c |End pair| to call|
|000060b0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|000060c0| 20 20 20 20 2a 20 44 65 | 6c 65 74 65 73 20 74 68 | * De|letes th|
|000060d0| 65 20 6d 61 70 70 69 6e | 67 73 20 64 61 74 61 62 |e mappin|gs datab|
|000060e0| 61 73 65 20 65 6e 74 72 | 79 20 61 74 20 70 6f 73 |ase entr|y at pos|
|000060f0| 2e 0d 20 20 20 20 20 2a | 20 65 6e 74 72 69 65 73 |.. *| entries|
|00006100| 20 6d 75 73 74 20 62 65 | 20 61 20 68 61 6e 64 6c | must be| a handl|
|00006110| 65 20 74 6f 20 61 20 76 | 61 6c 69 64 20 49 43 20 |e to a v|alid IC |
|00006120| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|00006130| 65 20 70 72 65 66 65 72 | 65 6e 63 65 2e 0d 20 20 |e prefer|ence.. |
|00006140| 20 20 20 2a 20 70 6f 73 | 20 73 68 6f 75 6c 64 20 | * pos| should |
|00006150| 62 65 20 65 69 74 68 65 | 72 20 61 20 76 61 6c 75 |be eithe|r a valu|
|00006160| 65 20 72 65 74 75 72 6e | 65 64 20 66 72 6f 6d 20 |e return|ed from |
|00006170| 49 43 47 65 74 49 6e 64 | 4d 61 70 45 6e 74 72 79 |ICGetInd|MapEntry|
|00006180| 20 6f 72 20 61 20 76 61 | 6c 75 65 0d 20 20 20 20 | or a va|lue. |
|00006190| 20 2a 20 63 61 6c 63 75 | 6c 61 74 65 64 20 75 73 | * calcu|lated us|
|000061a0| 69 6e 67 20 49 43 47 65 | 74 4d 61 70 45 6e 74 72 |ing ICGe|tMapEntr|
|000061b0| 79 2e 0d 20 20 20 20 20 | 2a 20 41 6c 73 6f 20 64 |y.. |* Also d|
|000061c0| 65 6c 65 74 65 73 20 61 | 6e 79 20 75 73 65 72 20 |eletes a|ny user |
|000061d0| 64 61 74 61 20 61 73 73 | 6f 63 69 61 74 65 64 20 |data ass|ociated |
|000061e0| 77 69 74 68 20 74 68 65 | 20 65 6e 74 72 79 2e 0d |with the| entry..|
|000061f0| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00006200| 63 74 69 6f 6e 20 49 43 | 41 64 64 4d 61 70 45 6e |ction IC|AddMapEn|
|00006210| 74 72 79 28 69 6e 73 74 | 20 3a 20 49 43 49 6e 73 |try(inst| : ICIns|
|00006220| 74 61 6e 63 65 3b 20 65 | 6e 74 72 69 65 73 20 3a |tance; e|ntries :|
|00006230| 20 48 61 6e 64 6c 65 3b | 20 76 61 72 20 65 6e 74 | Handle;| var ent|
|00006240| 72 79 20 3a 20 49 43 4d | 61 70 45 6e 74 72 79 29 |ry : ICM|apEntry)|
|00006250| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 20 20 | : ICErr|or;. |
|00006260| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|00006270| 2e 31 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |.1.. | * You m|
|00006280| 75 73 74 20 73 70 65 63 | 69 66 79 20 61 20 63 6f |ust spec|ify a co|
|00006290| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|000062a0| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|000062b0| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|000062c0| 59 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |You do n|ot have |
|000062d0| 74 6f 20 62 65 20 69 6e | 73 69 64 65 20 61 6e 20 |to be in|side an |
|000062e0| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|000062f0| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00006300| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 41 64 |utine.. | * Ad|
|00006310| 64 73 20 61 6e 20 65 6e | 74 72 79 20 74 6f 20 74 |ds an en|try to t|
|00006320| 68 65 20 6d 61 70 70 69 | 6e 67 73 20 64 61 74 61 |he mappi|ngs data|
|00006330| 62 61 73 65 2e 0d 20 20 | 20 20 20 2a 20 65 6e 74 |base.. | * ent|
|00006340| 72 69 65 73 20 6d 75 73 | 74 20 62 65 20 61 20 68 |ries mus|t be a h|
|00006350| 61 6e 64 6c 65 20 74 6f | 20 61 20 76 61 6c 69 64 |andle to| a valid|
|00006360| 20 49 43 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 | IC mapp|ings dat|
|00006370| 61 62 61 73 65 20 70 72 | 65 66 65 72 65 6e 63 65 |abase pr|eference|
|00006380| 2e 0d 20 20 20 20 20 2a | 20 54 68 65 20 65 6e 74 |.. *| The ent|
|00006390| 72 79 20 69 73 20 61 64 | 64 65 64 20 74 6f 20 74 |ry is ad|ded to t|
|000063a0| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 65 6e |he end o|f the en|
|000063b0| 74 72 69 65 73 20 64 61 | 74 61 62 61 73 65 2e 0d |tries da|tabase..|
|000063c0| 20 20 20 20 20 2a 20 4e | 6f 20 75 73 65 72 20 64 | * N|o user d|
|000063d0| 61 74 61 20 69 73 20 61 | 64 64 65 64 2e 0d 20 20 |ata is a|dded.. |
|000063e0| 20 20 20 2a 29 0d 20 20 | 0d 0d 28 2a 20 a5 a5 a5 | *). |..(* ...|
|000063f0| 45 6e 64 20 49 43 41 50 | 49 2e 70 a5 a5 a5 20 2a |End ICAP|I.p... *|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.